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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use JSON 'encode_json'; | |
| use HTTP::Tiny; | |
| use Getopt::Long; | |
| use Encode 'decode'; | |
| my %opts = (room => $ENV{HIPCHAT_ROOM}, notify => 1); |
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
| # Proudly robbed from ISBN-13: 978-1-934356-96-8 | |
| # | |
| # Setting the prefix from C-b to C-a | |
| set -g prefix C-a | |
| # Allow you to use C-a from bash | |
| # 10x 2 http://stackoverflow.com/questions/11557076/if-i-set-key-bind-of-c-b-to-c-a-in-tmux-how-can-i-move-the-cursor-to-the-beginni | |
| bind-key C-a send-prefix |
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
| #! /usr/bin/env perl | |
| #https://metacpan.org/pod/Function::Parameters | |
| use Data::Dumper; | |
| use feature 'say'; | |
| use Function::Parameters qw(:strict); |
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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
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
| <fieldset class="form-group"> | |
| <input ng-model="intervalCtrl.interval.distance" | |
| type="number" min="50" max="20000" class="form-control" | |
| placeholder="distance" title="Distance" integer required> | |
| </fieldset> |
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
| #!/bin/bash | |
| if [ ! $GIST_TOKEN ] | |
| then | |
| echo GIST_TOKEN is missing | |
| exit 1 | |
| fi | |
| if [ "$#" -ne 3 ]; then | |
| echo 'USAGE: GIST_TOKEN=secret '$0' "the description" public "the filename" < content' |
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
| var x = {}; var v = ["alpha", "bravo", "charlie" ]; [ "a", "b", "c" ].forEach(function(e,i,a){ x[e] = v[i] }); |
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() { | |
| var system = require('system'), | |
| fs = require('fs') | |
| data = { | |
| "header": { | |
| "days": "wg_fcst_tab_data_1.fcst['3'].hr_d", | |
| "hours": "wg_fcst_tab_data_1.fcst['3'].hr_h" | |
| }, | |
| "wind": { | |
| "speed": "wg_fcst_tab_data_1.fcst['3'].WINDSPD", |
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
| ; // Varzim Lazer Scraper | |
| (function(){ | |
| var system = require('system') | |
| , fs = require('fs') | |
| ; | |
| var page = require('webpage').create(), | |
| url= 'http://www.varzimlazer.com/natacao/', | |
| location_regex = new RegExp(url) |
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
| ;// A way of creating a list of step to feed phantomjs | |
| (function(){ | |
| steps = [{ | |
| 'action' : function(args){ | |
| console.log( 'hello, here are my params: ', args.join(' ') ); | |
| }, | |
| 'params' : { | |
| 'alpha' : 'a', | |
| 'bravo' : 'c', | |
| 'delta' : 'd' |