An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| /** | |
| * FizzBuzz with CSS | |
| */ | |
| body { | |
| counter-reset: fizzbuzz; | |
| } | |
| div { |
| /** | |
| * FizzBuzz with CSS | |
| */ | |
| body { | |
| counter-reset: fizzbuzz; | |
| } | |
| div { |
| require "json" | |
| require "net/http" | |
| require "colorize" | |
| def formatTemp(temp) | |
| temp_i = temp.to_i | |
| temp = temp + "°C" | |
| case | |
| when temp_i <= 0 | |
| temp.colorize(:blue) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| function bitRev(N) { | |
| var r = 0; | |
| val = 0; | |
| while(N > 0) { | |
| val = N&1; | |
| N >>= 1; | |
| r += val&1; | |
| r <<= 1; |