Skip to content

Instantly share code, notes, and snippets.

@egeste
egeste / bureau-rvm.zsh-theme
Last active November 21, 2017 23:05
Oh My ZSH NVM, RVM, optimized "Bureau" Theme
# oh-my-zsh Customized Bureau Theme
### NVM
ZSH_THEME_NVM_PROMPT_PREFIX="(node-"
ZSH_THEME_NVM_PROMPT_SUFFIX=")"
### RVM
ZSH_THEME_RVM_PROMPT_PREFIX="("
ZSH_THEME_RVM_PROMPT_SUFFIX=""
@egeste
egeste / this-is-ugly-code.coffee
Created August 25, 2014 02:55
Allow "/" in IDs for bootstrap scrollspy
refresh = $.fn.scrollspy.Constructor.prototype.refresh.toString()
replace = '''$('[id="' + href.replace(/^#/, '') + '"]')'''
newRefresh = refresh.replace '$(href)', replace
eval "$.fn.scrollspy.Constructor.prototype.refresh = #{newRefresh}"
@egeste
egeste / gist:e0351634c1fa3eb93163
Last active August 29, 2015 14:03
Referencing FactoryJS definitions by name
# Create a simple definition based on the Model definition.
# The provided definition will be extended onto the base definition when an
# instance is requested from the factory.
Oraculum.extend 'Model', 'Custom.Model', {
# Provide a simple method to illustrate that the instance gets composed.
quack: -> console.log 'quack', @id
}

Keybase proof

I hereby claim:

  • I am egeste on github.
  • I am egeste (https://keybase.io/egeste) on keybase.
  • I have a public key whose fingerprint is BD42 7E6C E28C F5E7 566A A25F EA2E 034B 6542 28E2

To claim this, I am signing this object:

@egeste
egeste / t9.coffee
Last active June 27, 2017 00:05
Solving t9 by compiling regular expressions
_ = require 'underscore'
# My phone
dialpad = {
'1': []
'2': ['a','b','c']
'3': ['d','e','f']
'4': ['g','h','i']
'5': ['j','k','l']
'6': ['m','n','o']