Skip to content

Instantly share code, notes, and snippets.

View rdlh's full-sized avatar
🚀
Doing things.

Rémi Delhaye rdlh

🚀
Doing things.
View GitHub Profile
@rdlh
rdlh / meta-tag.md
Last active August 29, 2015 13:57
iOS7 meta-tag

iOS7 meta-tag

<meta name="viewport" content="width=device-width, minimal-ui">

What you need to improve your development experience

Software environment

IMPORTANT : Get a UNIX environment (Linux, MacOS, ...)

You need a GOOD SHELL

  • Install oh-my-zsh A community-driven framework for managing your zsh configuration. Includes 120+ optional plugins (rails, git, OSX, hub, capistrano, brew, ant, macports, etc), over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
@rdlh
rdlh / nyan-cat-console.js
Created April 22, 2014 20:07
Get the NYAN CAT in your developer console !
var _nyan = 0;
var __nyan = [[
"+ o + o ",
" + o + + ",
"o + ",
" o + + + ",
"+ o o + o ",
"-_-_-_-_-_-_-_,------, o ",
"_-_-_-_-_-_-_-| /\\_/\\ ",
"-_-_-_-_-_-_-~|__( ^ .^) + + ",
@rdlh
rdlh / ec2-node.md
Last active August 29, 2015 14:01
Bootstrap Amazon Web Services EC2 with Node.js

Create your EC2

  • Launch Instance
  • Ubuntu Server (64b)
  • Micro Instance
  • Add storage
    • 30 Go max
  • Tag Instance
    • Name -> APP_NAME
  • Environement -> production
var host = "wurstify.me";
var pingInterval = 60000; // ms
var pingIntervalId = undefined;
var enabledSince = 0;
// source: http://stackoverflow.com/questions/736513/how-do-i-parse-a-url-into-hostname-and-path-in-javascript
var reURLInformation = new RegExp([
'^(https?:)//', // protocol
'(([^:/?#]*)(?::([0-9]+))?)', // host (hostname and port)
'(/[^?#]*)', // pathname
{
"Seti_ClosedFolder_dots": true,
"Seti_ClosedFolder_remove": true,
"Seti_ClosedFolder_same": true,
"Seti_SB_big": true,
"Seti_SB_bright": true,
"Seti_SB_med": true,
"Seti_in_4_a_treat": true,
"Seti_no_bar_undertabs": true,
"Seti_pad_3": true,

Keybase proof

I hereby claim:

  • I am rdlh on github.
  • I am rdlh (https://keybase.io/rdlh) on keybase.
  • I have a public key whose fingerprint is 6B41 A6DC D0B2 7B37 6B5E 669A 1755 EDB5 EEDB 8C18

To claim this, I am signing this object:

var dispatch = [{ referrer: 'referrer1.com', group_id: 1 }, { referrer: 'referrer2.com', group_id: 2 }, { referrer: 'referrer3.com', group_id: 3 }]
var results = $.grep(dispatch, function(e){ return e.referrer == document.referrer; });
if(results.length == 0) {
_slaask.init("xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
} else {
_slaask.init("xxxxxxxxxxxxxxxxxxxxxxxxxxxx", { user_group_id: results[0].group_id });
}
var i = 0
$('.Grid-cell').each(function() {
i++
var id = $(this).find('a').attr('href').split('/')[3]
setTimeout(function() {
window.open("https://thenounproject.com/icon/" + id + "/download/color/000000/svg/");
}, i * 1000)
})

Slaask user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server