Skip to content

Instantly share code, notes, and snippets.

View phantomjs-2.1.1.sh
TAR=phantomjs-2.1.1-linux-x86_64.tar.bz2
URL=https://bitbucket.org/ariya/phantomjs/downloads/$TAR
if ! [ -e $SEMAPHORE_CACHE_DIR/$TAR ]; then ( cd $SEMAPHORE_CACHE_DIR; wget $URL ); fi
sudo tar -xjf $SEMAPHORE_CACHE_DIR/$TAR -C /usr/local/
sudo ln -fs /usr/local/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
echo "PhantomJS version: $(phantomjs --version)"
View keybase.md

Keybase proof

I hereby claim:

  • I am enriquecanals on github.
  • I am ecanals (https://keybase.io/ecanals) on keybase.
  • I have a public key ASCus5sqKGYMTOvwGlWsMxzWM9NY7PHDkEOsH765fo9Ongo

To claim this, I am signing this object:

@EnriqueCanals
EnriqueCanals / index.haml
Created May 3, 2014
A Pen by Enrique Canals.
View index.haml
.load-spinner
.square.square-1
.square.square-2
.square.square-3
.square.square-4
View gist:11332266
// left: 37, up: 38, right: 39, down: 40,
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36
var keys = [37, 38, 39, 40];
function preventDefault(e) {
e = e || window.event;
if (e.preventDefault)
e.preventDefault();
e.returnValue = false;
}
@EnriqueCanals
EnriqueCanals / gist:11329249
Last active Aug 29, 2015
Simple 2 navigation slider
View gist:11329249
$(document).ready(function() {
$("#main_slide-1").addClass("active");
$(".slider-link-boxes").on("click", function() {
$(".slider-link-boxes").removeClass("active");
$(this).addClass("active");
$(".main-slides").removeClass("active");
$("#main_" + this.id).addClass("active");
View gist:3943482
require 'open-uri'
failed = []
File.read('File.txt').lines.each do |x|
begin
sleep(1)
st = Time.now.to_f
puts "#{x}: #{open(x).status }"
et = Time.now.to_f
puts (et - st)
View gist:3850674
def url_list
i = 0
pgCount = 80
while i < pgCount
i+=1
num = i < 10 ? '0'+i.to_s: i.to_s
p 'https://s3.amazonaws.com/edx-textbooks/guttag_computation/p0'+num+'.png'
end