This file contains 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 Data::Dumper; | |
use parent 'Web::Machine::Resource'; | |
our @data = qw( hello hi hey howdy ); |
This file contains 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 Data::Dumper; | |
use parent 'Web::Machine::Resource'; | |
our @data = qw( hello hi hey howdy ); |
This file contains 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 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 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 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 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 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 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 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" |
OlderNewer