Skip to content

Instantly share code, notes, and snippets.


Wagner Souza waghcwb

View GitHub Profile
View sass_and_less_compared.markdown

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.


esperlu /
Created Apr 27, 2011
MySQL to Sqlite converter
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
gre / easing.js
Last active Jan 17, 2022
Simple Easing Functions in Javascript - see
View easing.js
* Easing Functions - inspired from
* only considering the t value for the range [0, 1] => [0, 1]
EasingFunctions = {
// no easing, no acceleration
linear: t => t,
// accelerating from zero velocity
easeInQuad: t => t*t,
// decelerating to zero velocity
BaseCase / gist:2139106
Created Mar 20, 2012
A sample Cakefile
View gist:2139106
{exec} = require 'child_process'
task 'test', 'Runs all Jasmine specs in spec/ folder', ->
task 'compile', 'Compiles coffee in src/ to js in bin/', ->
task 'stitch', 'Stitches all app .js files', ->
keeguon / countries.json
Created Apr 5, 2012
A list of countries in JSON
View countries.json
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
jedp / gist:3005816
Created Jun 27, 2012
postMessage() security review checklist
View gist:3005816

Security-Reviewing Uses of postMessage()

The postMessage() API is an HTML5 extension that permits string message-passing between frames that don't share the same origin. It is available in all modern browsers. It is not supported in IE6 and IE7.

postMessage is generally considered very secure as long as the programmer is careful to check the origin and source of an arriving

letanure / estados-cidades.json
Last active Jan 19, 2022
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
View estados-cidades.json
"estados": [
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Assis Brasil",
stoplion / git add certain file types
Created Mar 23, 2013
git add all of certain file type
View git add certain file types
find . -name "*.sass" | xargs git add
mattheath / publicize-coderwall-membership.rb
Created Apr 12, 2013
Publicize membership of Coderwall organisations
View publicize-coderwall-membership.rb
require "github_api"
user = ''
token = ''
github = oauth_token: token
coderwall_orgs = []
github.orgs.list.each do |org|
coderwall_orgs << org.login if org.login =~ /^coderwall/
jonlabelle / string-utils.js
Last active Dec 22, 2021
Useful collection of JavaScript string utilities.
View string-utils.js
// String utils
// resources:
// -- mout,
* "Safer" String.toLowerCase()
function lowerCase(str) {
return str.toLowerCase();