Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Become major of a place on foursquare (Score 5, Interesting) 145

I don't use foursquare, but a friend was bragging about being mayor at a couple places. I commented that I could be mayor in a month or two. He ended up betting me I couldn't. I warned him that it was super easy and he would be stupid for making that bet, but he still did it. That night, shortly after a few drunken minutes trying to type my password, the first cron job started running...


#!/usr/bin/perl
# call it from cron with:
# perl foursquare_checkin <location_id> <latitude> <longitude> <your_login_email> <password>
# Ex: perl foursquare_checkin 2021944 40.676141 -73.983452 foo@bar.baz 12345
my ($user,$pass) = @ARGV[3,4];
my $auth = MIME::Base64::encode("$user:$pass",'');
use MIME::Base64;
use IO::Socket;
sleep(rand()*600); # so checkins are slightly random
my $sock = IO::Socket::INET->new(PeerAddr=>'api.foursquare.com', PeerPort=>80,
                                                                  Proto =>'tcp', Type=>SOCK_STREAM) or die;
$ARGV[1] += rand() * 0.0001 - 0.00005; # wobble location
$ARGV[2] += rand() * 0.0001 - 0.00005;
my $str = "vid=$ARGV[0]&private=0&geolat=$ARGV[1]&geolong=$ARGV[2]";
print $sock "POST /v1/checkin HTTP/1.1\r\nHost: api.foursquare.com\r\nUser-Agent:" ." Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ " ."(KHTML, like Gecko) Version/3.0 Mobile/1C10 Safari/419.3\r\nContent" ."-Type: application/x-www-form-urlencoded\r\nAuthorization: Basic " ."$auth\r\nContent-length: ", length($str)+2, "\r\n\r\n$str\r\n";
my $res = <$sock>;

And yes, I know that's ugly, and there's easier and cleaner ways, but it got the job done well enough to get me mayor of a few places and really pissed off the gambler before I turned it off for good. I have no idea if this still works (ie. lack of any form of message authenticity or handshake etc), but it wouldn't surprise me if it did... feel free becoming mayor of anywhere you want (you can even checkin to places across the country and back on a regular basis and they didn't catch it). But if it no longer works, don't ask me.

Comment Re:FSF was very non-specific, and probably wrong (Score 1) 171

AC's post should be modded up. In case it isn't, here it is:

Uh, yes they did. Read the follow-up piece linked from the post (https://www.fsf.org/blogs/licensing/more-about-the-app-store-gpl-enforcement), and it is specific that the issue is that Apple's Terms of Service add restrictions beyond the GPL. That is prohibited by the GPL; otherwise people could completely circumvent the GPL by adding their own license on top of it to take away all of the rights granted to you by the GPL.

Comment Re:If you're using GPL code, you have no choice (Score 5, Informative) 171

There is no "depends on how he's using it." If it doesn't have an LGPL interface header, you MUST release the code under GPL terms to use it.

(Sorry for the Clinton-esque answer) It depends on what you mean by "use". The problem with the original question is that there's not enough information to give a useful answer.. it's just fodder to get people talking with no real goal.

You can use GPL's software all you want, modify and recompile to your hearts content, and you don't have to release jack shit - unless you then distribute that stuff, and then only if you distribute it together (you can distribute your patches on their own with any license you choose).

That said, it sounds likely that the choices that NicknamesAreStupid made regarding various sources to include may not be very good choices, and they may be incompatible with his goals. Since he specifically mentioned the GPL (and especially since he didn't say LGPL instead), these compatibility pages should help:
http://www.gnu.org/licenses/li...
http://www.gnu.org/licenses/gp...
http://www.gnu.org/licenses/gp...

The FSF (Free Software Foundation) comments on GPL works within the Apple App store is also quite relevant:
http://www.fsf.org/news/2010-0...
http://www.fsf.org/blogs/licen...
http://apple.stackexchange.com... (see 2nd answer)

Essentially, if you do not hold the copyright for the GPL'd work you are including in your iPhone App that you want to put on the Apple App Store, then you're SOL.... the App Store agreements are incompatible with that (GPL says, "You may not impose any further restrictions on the recipients' exercise of the rights granted herein", but the the Mac App Store Terms of Service explicitly add other restrictions, such as "you may only install the software on five approved devices"). You might be able to get permission from the works authors, but that permission would be to distribute said code under a non-GPL license (possibly 3 clause BSD?)

Comment Re:do I have to spell it out? (Score 1) 212

put the versioning file system on top of the distributed file system.

I suspect you only got modded down because of the other comments you made, but I came here to say the above, so I'm just replying to you instead.
You can also reverse that. Linux has great support for stacking block devices and file systems.

The real question then becomes, what's the best combo? I don't think you'll find one answer for that because there are so many ways to do it.

You should get your real requirements in place first, and be sure you don't include stuff that you don't actually need. For example, is client access via smb required, or is the requirement that they have access to a networked file system of some sort (ex. would webdav work), or is that not a requirement at all and they would be ok using a checkout/checkin style system or some other specific program to get/put data?

Even without those requirements, here's some items I'd suggest looking at:
* DRBD : Distributed Replicated Block Device. The docs aren't all that great, and it can be awkward to work with, but it's nice, low level, and just works for raw blocks, meaning you can stick whatever you want on it and easily have a HOT/COLD setup (hot HOT/HOT with version 8). It can work above or below LVM too.
* GlusterFS : This does file based mirroring, replication, striping, load balancing, failover, etc. One nice thing is that it can be slapped on top of an existing filesystem. The downside (IMO) is that it's file based. That means it's garbage for replicating databases (just as an example). That has its benefits though, and may fit your use case nicely. It's pretty easy to use, but has a LOT of features (including built in NFS, CIFS, and smb servers).
* git and the many git based things out there. There's a TON of stuff that falls into this category. This moves away from trying to make a filesystem do all the work, but it brings a LOT of features if you adopt one of these. The fact that every user has a full repo copy means you don't have to worry about the "server" and distribution much. YMMV and all that.
* subversion "autoversioning" with WebDAV. Mount it as WebDAV and all saves generate new revisions. You could easily later this on DRBD or Gluster.
* Dropbox et al. : most of these things have a way to share files with a group, keep local copies in sync, and provide versions to some extent. Use OwnCloud if you want to do it yourself.

Comment Re:But Google Code? (Score 1) 44

Most of the comments here are in this vein, and that was my first thought as well, and I doubt I'll trust them to host jack for me.

That said, they're a big company; they try stuff out and see if it works; when something doesn't "work", they get rid of it... how do they go about revisiting a topic with a different (and possibly much better) approach without drawing these kinda of reactions? All I really mean is, I don't want them to stop trying... if they do get it "right", that'll could be great.

To answer my own question though... they could start by not shuttering perfectly functional projects unless really necessary; build a replacement (with an easy way to move to it) before shutting it down; and/or spin off those things more cleanly to someone else, or open source them.

Comment Re:Arrest (Score 2) 333

What's illegal about protesting illegal government actions? Uber is ILLEGAL in France but they continue to operate! Do you understand the concept of "protest"? The idle rich like you are SUPPOSED to be inconvenienced, it is the INTENTION that you get annoyed.

You almost sound like you're arguing with yourself...

person A) What's illegal about protesting illegal government actions?
person B) Uber is ILLEGAL in France but they continue to operate!
person A) Do you understand the concept of "protest"?

I know that doesn't totally make sense, but neither does citing the "protest" of illegal government actions while simultaneously lambasting uber continued operation simply because it's ILLEGAL. What the taxis are doing isn't really protest either - they're blocking public services, which is more like a hostage situation, blackmail, or extortion.

Personally, I can't pick a side in this debate. Both seem wrong to me as exaggerated ends of the spectrum...

UBER: it breaks a lot of the significant and good strides that were made within the various taxi systems (though that's city-specific). For example, in NYC, if you get in a taxi, the drive is required to take you wherever you want to go - even out of state. They're not allowed to kick you out. If they do, be sure to take down their badge number (which is required to be displayed prominately) and/or license plate, and report them... none of them want to get in trouble at all because it would risk losing the medalion. There's lots of other (good for the people) rules that go along with being licensed correctly. The service may be doing ok, but discrimination is actual one of its features (whether or not that gets abused).

TAXI: WTF medalion prices and artificial rarity! The exclusive club that was created can go fuck itself. Services like Uber can't comply if they wanted to.

Somewhere in the middle is where things need to be (IMO), but I have no clue how that can be accomplished. Maybe if licensed taxi services could use uber without charge (or very low charge), and they got a special badge or something within uber so one could search for official taxis if they so chose, then it'd help level the playing field (IE. allow people to choose to pick a driver that probably lacks proper insurance, licensing, etc, but also allow people to find those that do carry those credentials).

Comment Re:Why now and not at release time. (Score 5, Informative) 193

Of course it's a bid for profit, whether immediate or long term. Why they thought it'd give them more profit has a bunch of reasons too, which may or may not pan out.
* make people buy the new console for the new games - check, though that may not have got as much market as they hoped
* hidden feature to later steal market share (ps4 lacks backward compat... which, IMO, is dumb... xbox can enable it easier due to less significant architecture changes).
* As said below, this is NOT enabling all games to work. It doesn't even use your old game - it just uses it to verify you have it so it can get you a digital copy of the xbone version. This is not backward compat in any way - it's a port they'll give you for free, and only for ones where all the red tape is cleared and they have a copy (ie. AAA titles could refuse to port to force repurchase; small titles may not have the means; etc).

AFAICT, this is smart, though misleading, marketing, and nothing more.

Comment Re:That's fine and all (Score 2) 204

Except no Wifi.... but that's normal for the surface 3 on Windows 8.1 Last update borked wifi hard and I had to wipe my surface to defaults to get it back.

Except that the very link that "mystuff" provided shows that WiFi DOES work under ubuntu 14.04 on the Surface Pro 3. Where'd you get your info? Seems you just need to copy the wifi firmware into place, which is trivial (use a thumb drive). The hardest part seems to be getting the windows partition resized (forcing system files to move by using PerfectDisk).

Comment Re:I've already uninstalled the windows 10 nag ico (Score 1) 374

that's interesting because my windows update experience is nothing like yours. You know you can go to windows update settings and tell it to act just like your OSX download and notify, download and install, do nothing and let you check/download/install manually.

Correct me if I'm wrong (I'm not intimately familiar with either), but it seems like the major difference is that:
* mac : can download and install and puts up a reminder to reboot. When you shutdown, the shutdown doesn't take extra long applying the updates - that's done in the boot up part, and usually only takes seconds.
* windows : it's choices are:
1. download and do nothing. When you do install, you'll have to sit through the entire install as well as the lengthy shutdown while it applies stuff.
2. download and install, notify of restart. When you finally shutdown to go home, you're now stuck waiting for a lengthy shutdown (this was the original complaint).
3. don't do anything. Like #1, but you also have to download everything.
4. Some mix of the above, but only for critical stuff, or for everything.

I know that I've experienced the lengthy shutdowns on Windows on many occasions. If you're not seeing that, then you're not applying updates. The GP claimed OSX lacked any lengthy delay on reboot (maybe an additional 10secs on boot). I can vouch for the majority of Linux distros - on the rare occasion that a reboot is needed, it takes no longer than normal (it doesn't rely on some shutdown or startup hooks to complete the installation of various components, except on the very very first boot). That's a pretty significant difference in behavior.

Comment Re:So now... (Score 1) 95

I'm surprised you haven't put two and two together. All your phones last longer than all your wifes phones. That's one of the two major trends your case shows, the other being that, coincidentally, all your phones were Android devices and hers were iphones. I'd be willing to wager real money that usage patterns are quite different (ie. she probably uses her phone more, or some feature of it that draws more battery power - maybe just checking it more often (screen use); maybe she keeps gps/wifi/bluetooth all on all the time and you don't; maybe it's apps or talk time; maybe just one game she plays a lot; etc).

FWIW, I've never owned, and do not plan to ever own, and iphone. My own usage patterns have GREATLY affected my own battery life. I picked up an addictive game a while back, and my battery life dropped from days down to about half a day. It doesn't even get much actual phone time, but when it does, it sucks down juice like crazy. If you want a better anecdotal experience, swap phones with her for a week (turning off all background apps the other used), and use similar stuff to what you used on the other phone.

Comment Re:Seriously? (Score 2) 366

By the way, CSV was the golden standard for many years. Given the tight compactness/memory budget that space projects have, CVS with it's small foot print might well be the logical choice.

We're talking about telemetry beacon data written once every 15 minutes. CSV is NOT the ideal format for that, and is nowhere near compact. Naive CSV parsers are trivial, but also break very very easily (ex. embedded new lines in a quoted field; quotes in a quoted field; mixed quotes; etc). Also, while CSV can be read in a text editor, it doesn't format nicely there and can be difficult to read, so human readability is low; add to that the fact that humans are unlikely to be logging in directly and reading the file directly, and it being in plain text is pretty much useless. A fixed format binary file would be FAR more compact, easier to parse via a program, trivial to convert to CSV if needed, and really has no downsides besides users not being able to double click it and open it in excel/oocalc.

Using a binary file would also allow more efficient access. There were comments implying that they were sucking the whole thing into memory at some point, which isn't needed for CSV either (unless a stray quote got in there and the parser didn't have a max record length limit), but it's certainly easier to jump to a specific record if you have fixed length records (which, being telemetry data, should be entirely possible).

None of that really matters though. They file grew in size, and wasn't getting truncated or rotated - that's broken by design. Waiting for reboot is crazy (and implies that this was going to a tmpfs in memory, which is all the more reason to use a more compact format).

Comment Re:What a guy (Score 1) 389

Yes, a pen register, which from 1984 - 2001 was defined as:

A device which records or decodes electronic or other impulses which identify the numbers called or otherwise transmitted on the telephone line to which such device is dedicated.

See also here: http://en.wikipedia.org/wiki/P... ... a pen register did not require a warrant.

However, your nuts if you think the proposed bill is anything like pre-patriot act!

The Electronic Communications Privacy Act (1986) made it a requirement that law enforcement agencies obtain a court order in order to get a pen register approved for surveillance.

That wasn't for bulk collection, and there was no provision for storage, archival, historical access, etc etc etc. When they got their court order, they were then able to obtain a live feed from one line, the caller (how that was provided varied).

In addition, even the patriot act definition of pen register, which is much more broad, had provisions to exclude data the telco normally stored. An excerpt from title 18 (find more at the wiki link above):

... but such term does not include any device or process used by a provider or customer of a wire or electronic communication service for billing, or recording as an incident to billing ...

It's still equal or worse IMNSHO. Are you sure you're not the one that's confused?

Comment Re:Get rid of it (Score 4, Insightful) 389

Everything. Real change comes by voting third party.

This.

So tired of seeing:
* "Would the other guy have done better?"... why is that singular?
* "the alternative wasn't much better" ... shouldn't that read, "the alternatives weren't much better"?

Every single person that repeats trash like that needs to open their eyes and start checking a different box. The other parties DO get elected into various positions across the country all the way up into the senate and house.

Comment Re:What a guy (Score 2) 389

You did read the summary of the article...
"Obama criticized the Senate for not acting on that legislation, saying they have necessitated a renewal of the Patriot Act provisions."

It is the failure of the gop controlled Senate to pass the new rules form the House that has kept the Patriot Act in place

That's a piss poor scapegoat. "necessitated" my ass.
The provisions in the aforementioned legislation just move the data storage down a level, and still give them unfettered access to the same data (and probably even more data than before), and also push the burden of said collection, storage, API's, security, etc onto the telco's who, while they are quite large, are still companies. That would also further limit the ability for competitors to compete, as it's yet another significant hurdle/requirement that would legally need to be met. And what happens if and when there is a data leak? - it's the telco's fault then, even though they will have been forced into that precarious situation (forced to record said data for extended periods, and to centralize it, and to make it readily accessible).

He's essentially saying he would allow section 215 to be removed from the patriot act only if an equal or worse provision were enacted elsewhere. The worse the senate did here was to force his hand - risk allowing that provision to drop, or actively support it and be force to take a *little* responsibility for its existence.

FWIW, I'm neither red nor blue.

Slashdot Top Deals

Happiness is twin floppies.

Working...