Skip to content

Instantly share code, notes, and snippets.

@rachidbch
rachidbch / dom-helper.js
Created July 18, 2017 16:20 — forked from SitePointEditors/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
// routes.js
const routes = [
{
path: '/',
component: Home,
exact: true
},
{
path: '/gists',
component: Gists
0x709035c91E2ef778E55f503F1c9Dac0993e63307
@rachidbch
rachidbch / ramda
Last active July 28, 2016 09:19 — forked from raine/ramda
Browse Ramda documentation in Terminal
#!/usr/bin/env bash
# Cette snippet permet de faire une recherche interactive en ligne de commande dans un document JSON.
# Ici c'est utilisé pour faire un live search de la doc Ramda mais le même principe peut être utilisé pour toute documentation structurée
# Browse Ramda documentation in Terminal
# Requires jq and a tool such as fzf or peco for interactive filtering
LATEST="http://raine.github.io/ramda-json-docs/latest.json"
DOCS_URL="http://ramdajs.com/docs/"
On linux, shebang accepts only one argument.
As we use nvm we can't adress node executable by path and have to resort to /usr/bin/env.
Unfortunately `#!usr/bin/env node --harmony` won't work since it needs 2 arguments ...
This [article](http://sambal.org/2014/02/passing-options-node-shebang-line/) proposes a hack.
The content of the article is copied below.
{ 2014 02 01 }
Passing options to node on the shebang (#!) line
@rachidbch
rachidbch / build-zsh.sh
Created June 22, 2016 17:33 — forked from nicoulaj/build-zsh.sh
Build Zsh from sources on Ubuntu
#!/bin/sh​
# Build Zsh from sources on Ubuntu.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo
git clone git://zsh.git.sf.net/gitroot/zsh/zsh
cd zsh
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h1>Mobile First Century</h1>
<h3>Gist & Reveal.js Powered</h2>
<h2>Presentation Slides</h2>
<p class='fragment'><small><a class='fragment' href='http://github.com/ryanj/gist-reveal.it'>github.com/ryanj/gist-reveal.it</a>
<br/> <a class='fragment' href='https://registry.hub.docker.com/u/ryanj/gist-reveal.it/'>registry.hub.docker.com/u/ryanj/gist-reveal.it</a></small></p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>