Skip to content

Instantly share code, notes, and snippets.


Alexandre Gaudencio Shahor

View GitHub Profile
View proxy.js
let Process = require('process')
let obj = {
toto () {
return 42
function *range(s, e) {
for (; s < e; s++) {
yield s
View static.js
class Base {
constructor (id) {
this._id = id
say () {
View win 10 hosts
# c.f. :
# Add these lines to HOSTS to block known Microsoft telemetry sites used by Windows 10 v2
Shahor / pr.js
Last active Aug 29, 2015
write a function that takes an array as input that can contain both ints and more arrays (which can also contain an array or int) and return the flattened array.
View pr.js
function flatten(input) {
var ret = []
input.forEach(function (inp) {
ret = ret.concat(Array.isArray(inp) ? flatten(inp) : inp)
return ret
Shahor /
Last active Aug 29, 2015
ebook converter
#!/usr/bin/env bash
if ! type "ebook-convert" > /dev/null; then
echo "ebook-convert tool not found in your PATH. Please install it (via Calibre) and re-run this script";
# Pass a path as first argument
function convert {
for file in "$1"/*

Keybase proof

I hereby claim:

  • I am shahor on github.
  • I am shahor ( on keybase.
  • I have a public key whose fingerprint is 09E3 944B 5F60 9B5C 015C 8800 2078 61F7 F265 2600

To claim this, I am signing this object:

Shahor / registrations_controller.rb
Created Dec 7, 2012 — forked from evanbeard/registrations_controller.rb
API JSON authentication with Devise
View registrations_controller.rb
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user =[:user])
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>, :status=>201
Shahor / tomorrowNight-theme.tmTheme
Created Jun 21, 2012
Tomorrow theme for sublimetext2
View tomorrowNight-theme.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Tomorrow Night</string>
Shahor /
Created May 26, 2011
Modeste traduction


Cet article est une traduction de ce blog post qui m'a beaucoup touché.

Je ne prétends pas être un traducteur expert Anglais/Français aussi il peut y avoir quelques approximations par endroits et je m'en excuse. Quoi qu'il en soit j'ai tout fait pour garder le sens initial de l'article et je pense avoir bien œuvré en ce sens.

Bonne lecture.

You can’t perform that action at this time.