Skip to content

Instantly share code, notes, and snippets.

View bobylito's full-sized avatar
🎩
JSing 🚀

Alex S bobylito

🎩
JSing 🚀
View GitHub Profile
@bobylito
bobylito / AMMOY.js
Created April 18, 2011 22:21
A small script for phantom.js that gets your mangas that came out last month
/*
* Are my mangas out yet?? AMMOY??
* a little script that could be croned to know if the mangas you follow are out.
*/
// Website where to fetch infos
var urlMV = "http://www.mangaverse.net/html/planning/listesorties.htm";
// The regexp to get the info
var reTitre = /- (.+) ([0-9]+) \(.+\)/;
// The titles you follow
@bobylito
bobylito / iepp.js
Created October 5, 2011 12:54
Iframe not printing in IE 8 using IEPP
/*! iepp v2.2 MIT/GPL2 @jon_neal & afarkas */
(function(win, doc) {
//taken from modernizr
if ( !window.attachEvent || !doc.createStyleSheet || !(function(){ var elem = document.createElement("div"); elem.innerHTML = "<elem></elem>"; return elem.childNodes.length !== 1; })()) {
return;
}
win.iepp = win.iepp || {};
var iepp = win.iepp,
elems = iepp.html5elements || 'abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video',
elemsArr = elems.split('|'),
@bobylito
bobylito / gist:4418138
Created December 31, 2012 07:36
Rename camera sdcard folders to a proper pattern
ls | grep ..._.... | while read f; do mv $f `echo $f | sed "s/\(..._\(..\)\(..\)\)/2012-\3-\2/g" `; done
@bobylito
bobylito / hack.sh
Created February 7, 2014 10:13 — forked from natewave/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@bobylito
bobylito / Polka_dots.glsl
Created May 20, 2014 12:09 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
uniform float dots;
void main() {
@bobylito
bobylito / PolkaDotsCurtain.glsl
Created May 20, 2014 16:55 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
const float SQRT_2 = 1.414213562373;
uniform float dots;// = 20.0;

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@bobylito
bobylito / import.js
Created March 22, 2015 11:18
Import data to Algolia with Node.js streams.
// npm install agentkeepalive batch-stream csv-parse stream-transform
var HttpsAgent = require('agentkeepalive').HttpsAgent;
var Algolia = require('algolia-search');
var stream = require( 'stream' );
var parse = require('csv-parse');
var fs = require('fs')
var transform = require('stream-transform');
var Batch = require( 'batch-stream' );
@bobylito
bobylito / highless.sh
Last active October 31, 2017 05:08
Less with syntax higlighting
hl(){
highlight -O ansi $1 | less -r
}
@bobylito
bobylito / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console