Skip to content

Instantly share code, notes, and snippets.

View jordinebot's full-sized avatar
👋
Hi! I'm Jordi.

Jordi Nebot jordinebot

👋
Hi! I'm Jordi.
View GitHub Profile
@jordinebot
jordinebot / mod.coffee
Last active September 10, 2015 08:58
Number::mod
if typeof Number::mod isnt 'function'
Number::mod = (n) ->
( ( @ % n ) + n ) % n
function array_reorder( $array, $index_from, $index_to ) {
array_splice(
$array,
$index_to,
count( $array ),
array_merge(
array_splice( $array, $index_from, 1 ),
array_slice( $array, $index_to, count( $array ) )
)
);
@jordinebot
jordinebot / String::contains
Created January 22, 2015 11:29
CoffeeScript 'contains' String prototype
###*
* String prototype to check the presence of a substring
* @param {String} needle to look for
* @return {Bool} Presence of needle in String
###
if typeof String::contains isnt 'function'
String::contains = (needle) ->
(@.match new RegExp needle.replace(/[-[\](){}*+?.,\\^$|#\s]/g, "\\$&"))?
@jordinebot
jordinebot / gist:3e8ebf032884379f3a99
Created August 22, 2014 10:35
Medium.com .is-languageTier3 styles
.is-languageTier3 .graf--h3 {
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif
}
.is-languageTier3 .postContent {
font-family: Georgia, Cambria, "Times New Roman", Times, serif
}