Skip to content

Instantly share code, notes, and snippets.

View nucliweb's full-sized avatar
⚡
Debugging…

Joan León nucliweb

⚡
Debugging…
View GitHub Profile
@nucliweb
nucliweb / slugify.js
Created July 23, 2015 07:08
Javascript Slugify
// from https://gist.github.com/mathewbyrne/1280286
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@nucliweb
nucliweb / frontendDevlopmentBookmarks.md
Last active August 29, 2015 14:25 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@nucliweb
nucliweb / Curso-DevTools.md
Last active April 8, 2021 03:46
Desarrollo Frontend con Developer Tools
@nucliweb
nucliweb / Clone-All-Repos-GitHub-Organization.md
Last active June 23, 2026 14:13
Clone all repos from a GitHub organization

Publics repos

With Ruby 1.8 (default version on MacOS) :

sudo gem install json
curl -s https://api.github.com/orgs/[ORGANIZATION]/repos | ruby -rubygems -e 'require “json”; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'

With Ruby 1.9+, the json library is by default thus you just use :

@nucliweb
nucliweb / gist:556494fec84f6acd1b9a
Last active August 29, 2015 14:24
Sublime Text 3 Preferences
{
"auto_complete_commit_on_tab": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
# http://sass-guidelin.es/es/
# For SCSS-Lint v0.32.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
@nucliweb
nucliweb / gist:f984b9fc75a1c82ef1a1
Last active June 29, 2022 09:26
Sublime Text 3 on OS X Terminal

Sublime Text 3 on OS X Terminal

By creating link

Linking into /usr/bin with sudo:

$ sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/sbl
@nucliweb
nucliweb / image.width.js
Last active November 16, 2015 15:43
image.width
var image = document.querySelector('img');
console.log( 'Computed width: ' + getComputedStyle(image).getPropertyValue('width') );
console.log( 'image.width: ' + image.width );
console.log( 'image.naturalWidth: ' + image.naturalWidth );
console.log( 'getAttribute(width): ' + image.getAttribute('width') );
console.log( 'image.getBoundingClientRect().width: ' + image.getBoundingClientRect().width );
@nucliweb
nucliweb / gist:de4a96e7cbcac9bc9913
Created May 9, 2015 21:41
List branches & revision date #git
git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:iso8601)%09%(refname)' refs/heads
@nucliweb
nucliweb / SassMeister-input.scss
Created May 4, 2015 08:46
Generated by SassMeister.com.
// ----
// libsass (v3.1.0)
// ----
$fontSizeBase: 14; // var in _variables.scss
@mixin font-size( $fontSice ){
font-size: ($fontSice / $fontSizeBase) * 1rem;
}