News for hackers. Stuff that matters.

pielud

Re:W3C HTML JSON form submission on Wednesday November 26, 2014 @07:43PM (#8665422)
It lets you comment out a line without having to remove the trailing comma from the previous line. That'd be useful if JSON had comments.

I've seen people do this in the SELECT portion of SQL queries too.

Personally, I hate this.

Ah yes, looks like it does use CONNECT.
This looks pretty cool, but why not just run sshd on port 80/443 then use corkscrew[1] to tunnel through an http proxy?

[1] http://www.agroman.net/corkscrew/

For python, there's pexpect: http://pexpect.readthedocs.org/en/latest/
Re:So You Think You Want to Open a Brewery on Monday March 10, 2014 @07:55PM (#7376513)
You could probably do something like that, but it'd be a huge waste of time. The time to brew a batch is pretty much the same no matter the volume. I.E. Brewing a 5 gallon batch takes about the same amount of time as brewing 20 gallons, assuming you have the equipment capable of doing that volume.
Re:Inside DuckDuckGo, Google's Tiniest, Fiercest Competitor on Thursday February 20, 2014 @01:13PM (#7272523)
Here are all of the supported ! searches:

https://duckduckgo.com/bang.html

or just search ddg for !bang

Re:Inside DuckDuckGo, Google's Tiniest, Fiercest Competitor on Thursday February 20, 2014 @11:46AM (#7271790)
The killer feature for me with ddg (as a programmer) is the ! searches for documentation:

  !php strstr
  !python os.makedirs
  !pypi requests
  !js String
etc.

This gives you a single search bar for all documentation, which is amazing.

edit: formatting

Re:Silk Road 2 Hacked, All Bitcoins Stolen on Thursday February 13, 2014 @08:49PM (#7236312)
As another reply has suggested, David Friedman's Machinery of Freedom is an excellent book which describes how private defense, law and dispute resolution might happen.

This video is a good introduction to the ideas presented in the book http://youtu.be/jTYkdEU_B4o

Re:Using GNU Stow to manage your dotfiles on Wednesday September 04, 2013 @10:05PM (#6331776)
I take a similar approach. I have a dotfiles git repo in ~/dotfiles/ and have a Makefile which creates symlinks in my home directory. For example, ~/.bashrc is a symlink to ~/dotfiles/bashrc. That way, I can have a whitelist (whatever's in the Makefile) instead of a blacklist (like a .gitignore).
Re:How to share your data effectively on Monday April 08, 2013 @08:12PM (#5515612)
Any numbers with leading zeroes, i.e. 0000123, excel will interpret as the integer 123 even if you change the column format to "text". It's infuriating.

The only way I found to get around this was to open a new workbook, change the column type to "text" and then paste the data in. I believe this was excel 2010 on windows.

Re:SQL is Agile on Friday December 28, 2012 @09:47PM (#4980859)
How do I combine data from multiple log files? How do I tweak my "queries" without scanning all of the data again? You get this kinds of things (joins, indexes, etc) for free from RDBMS. If I'm analyzing log files I have to write my own code to do it.

I'm not saying RDBMS is the best solution for everything and neither is OP. But it's appropriate when you don't necessarily know every way you want to access your data up front.

Re:SQL is Agile on Friday December 28, 2012 @09:03PM (#4980715)
> RDBMS exist because people use to query those systems directly , does your users log into your database directly ?

No, but I do. What if I want to analyze my data in some way I hadn't expected? SQL lets me do that with a single query.

Re:SQL is Agile on Friday December 28, 2012 @07:42PM (#4980421)
1. Your ORM can derive it's schema from the database's.

2. I think the main point of the post was that you can run ad-hoc SQL queries no matter how much you've denormalized. You can't necessarily do that with a NoSQL database.

Re:Git add -p: a powerful git feature on Monday November 05, 2012 @12:40PM (#4744783)
I don't ever use git -p directly, but I use magit (https://github.com/magit/magit) for emacs, which makes staging changes this way very easy.
Re:Gunsmith Uses 3D Printer To Make A Rifle on Thursday July 26, 2012 @03:23PM (#4298062)
Why wouldn't he just grab a knife from his kitchen? Or run them down with his car? Or a bat? Or set their house on fire?

Not having a gun isn't going to stop a person who wants to hurt someone else from doing it. It's just a tool.

Re:Underrated Features of PostgreSQL on Wednesday November 02, 2011 @10:35AM (#3186874)
Where is transactional DDL on this list?
Re:Apache vulnerable to easy DOS attack - workaround available on Thursday August 25, 2011 @08:20AM (#2924623)
You make a request for several ranges of a file using the range header, something like:

Range: bytes=100-200, 600-800, 1500-

If the server supports ranges, it will respond with a 206 Partial Content status, and send a multipart/byteranges response body, which looks like this http://www.freesoft.org/CIE/RFC/2068/225.htm. Basically a delimited string containing all the ranges.

This is useful for some streaming audio/video formats and especially for large pdfs. IIRC, pdfs typically have header information at the end of the file, so it's useful for a pdf reader to get the end of the file first.

Re:DOJ: We can force you to decrypt that laptop on Monday July 11, 2011 @12:48PM (#2751465)
Do you think the government should have subpoena power in order to collect evidence? Do you think they should be able to search a murderer's home for the weapon?

Of course they should. But that's no the issue here. The issue at hand is whether or not the government can compel you to give them information.

Consider this. You have a box, buried in the Mojave desert, with some documents in it. You've memorized the gps coordinates of this box. Should they be able to compel you state those coordinates?

Sure, they could search 100s of square miles looking for your box, and they might stumble upon it. But they shouldn't be able to force your to tell them where it is.

An encryption key is the same. They can try to brute force it if they wish. They're just looking for a much smaller box in a much bigger desert.

Re:DOJ: We can force you to decrypt that laptop on Monday July 11, 2011 @12:11PM (#2751298)
These protections extend to everyone, no matter how despicable.

In order for good people to be free, some bad guys might also get away. Such is the price of a free society.

Re:Revealed: The guy behind IMDb on Saturday January 01, 2011 @12:51PM (#2057941)
Oops. Somehow missed that link at the bottom.
Re:Jesus Christ, Use a Password Manager Already on Tuesday December 14, 2010 @09:01PM (#2006697)
I like clipperz.com. Completely web based. Encryption is done client side in javascript, so not even clipperz can access my account.
Re:Remote pbcopy on Tuesday November 30, 2010 @02:02PM (#1955171)
Can't this be achieved just using ssh instead of setting up a process that listens to the network?

from remote machine:

  ssh me@macbook pbcopy < foo.txt
Re:Ask HN: What annoys you? on Friday July 30, 2010 @10:13AM (#1561157)
Especially doing anything that requires one bank to talk to another. Why does it take 5 days to move money between banks? It's ridiculous.

I once had mistakenly setup a transfer from one bank to another and I wanted to cancel it. So I called up the destination bank and they said there was nothing they could do. I called the source bank and had to pay 30 bucks to put a stop payment order on the account AND they couldn't guarantee it would stop the transfer.

Re:Obama Administration Announces New Anti-Piracy Initiative on Wednesday June 23, 2010 @11:25AM (#1455155)
Are you suggesting that there's 4 Chinese guys putting out records of Pink Floyd covers? Somehow, I don't think I'd mistake them for the original.

Older »