This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Hackmachine::Resource; | |
use strict; | |
use warnings; | |
use parent 'Web::HyperMachine::Resource'; | |
__PACKAGE__->uri('hack'); | |
__PACKAGE__->related('Hackmachine::OtherResource'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1p() { | |
echo -en "\033[?7l" | |
"$@" | head -$(expr $(tput lines) - 2) | |
echo -e "\033[?7h" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ http localhost:5000/trope Accept:application/json | |
HTTP/1.0 200 OK | |
Content-Length: 130 | |
Content-Type: application/json | |
Date: Wed, 19 Feb 2014 14:11:31 GMT | |
Server: HTTP::Server::PSGI | |
Vary: Accept | |
{ | |
"items": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.readdir(dir, function(err, files){ | |
for(x in files){ | |
let fn = files[x]; | |
if (! fn.match(/\.html$/)) { | |
continue; | |
} | |
fs.readFile( | |
dir + '/' + fn, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.010; | |
use strict; | |
my $i = 0; | |
my %fb = qw (3 fizz 5 buzz 7 wolf); | |
my %h = map { (2 ** $i++), $_ } qw (fizz buzz wolf); | |
for my $x (1..105) { | |
my $num = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return (isNaN(ai) || isNaN(bi)) ? | |
(a > b) ? 1 | |
: (a < b) ? -1 | |
: 0 // not floats | |
: (ai > bi) ? 1 | |
: (ai < bi) ? -1 | |
: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time git stash pop | |
On branch user-page | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: fuel/app/modules/management/views/user/list.php | |
Untracked files: | |
(use "git add <file>..." to include in what will be committed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebase example! | |
=============== | |
I forgot to commit some things remotely before I cloned my repo to work locally. | |
altreus@local:~ $ git clone altre.us:altre.us | |
Cloning into altre.us ... | |
<snip> | |
altreus@local:~/altre.us $ do_stuff | |
altreus@local:~/altre.us $ git commit -a -m"Turn off static cache for now" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delayedAddIcon(chart, flags) { | |
if ($('#topSubscribers .highcharts-container').length) { | |
addIcon(chart, flags); | |
} | |
else { | |
setTimeout(function() { | |
delayedAddIcon(chart, flags); | |
}, 100); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ PATH_INFO="/altre.us.git/HEAD" GIT_PROJECT_ROOT=/opt/git REQUEST_METHOD=GET /usr/lib/git-core/git-http-backend | |
Expires: Fri, 01 Jan 1980 00:00:00 GMT | |
Pragma: no-cache | |
Cache-Control: no-cache, max-age=0, must-revalidate | |
Content-Length: 23 | |
Content-Type: text/plain | |
Last-Modified: Thu, 22 May 2014 12:23:33 +0000 | |
ref: refs/heads/master |