Skip to content

Instantly share code, notes, and snippets.

View julio-saito-linx's full-sized avatar

Julio M Saito julio-saito-linx

  • Linx
  • São Paulo, Brasil
  • 15:15 (UTC -03:00)
View GitHub Profile
@mxriverlynn
mxriverlynn / 1-ModelWithChangedEvents.js
Created June 15, 2011 03:12
simple backbone.js examples
var SomeModel = Backbone.Model.extend({});
someModel = new SomeModel();
someModel.bind("change", function(model, collection){
alert("You set some_attribute to " + model.get('some_attribute'));
});
someModel.set({some_attribute: "some value"});
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
@metalivedev
metalivedev / gist:6085112
Created July 26, 2013 00:33
42 Layer Limit to AUFS using "base" image
Sample Dockerfile, then sample build output
#--------------
FROM base
RUN echo Layer 0 >> layerfile.txt
RUN echo Layer 1 >> layerfile.txt
RUN echo Layer 2 >> layerfile.txt
RUN echo Layer 3 >> layerfile.txt
RUN echo Layer 4 >> layerfile.txt
@marioluan
marioluan / remover-acentos.js
Created October 10, 2013 18:27
Funcao marota para remover acentos de strings. Foi utilizado expressao regular em cima de caracteres representados na base hexadecimal.
/**
* Remove acentos de caracteres
* @param {String} stringComAcento [string que contem os acentos]
* @return {String} [string sem acentos]
*/
function removerAcentos( newStringComAcento ) {
var string = newStringComAcento;
var mapaAcentosHex = {
a : /[\xE0-\xE6]/g,
e : /[\xE8-\xEB]/g,
@julio-saito-linx
julio-saito-linx / one_line_util.md
Last active January 1, 2016 14:49
linux - my one-line reff

###shell

  • Install from INSTALLATION_FILE.tar.gz
    tar xzf INSTALLATION_FILE.tar.gz
    ./configure
    make
    sudo make install
@anissen
anissen / .jscs.json
Last active January 25, 2024 23:58
Example gulpfile for some useful tasks
{
"requireCurlyBraces": ["else", "for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
@danielfilho
danielfilho / braziljs-2014-talks.md
Last active November 27, 2022 21:04
Talks, slides and links from BrazilJS 2014

#BrazilJS 2014

Talks: slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini interview · slides · video
1 Frontend at Scale - The Tumblr Story Chris Miller interview · slides · video
1 Intro to GFX: Raw WebGL Nick Desaulniers interview · slides · video
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@nuxlli
nuxlli / agent_start.sh
Created April 23, 2015 19:02
Run azk agent in a script
#!/bin/bash
echo "" > /tmp/azk-agent-start.log
./bin/azk agent start --no-daemon > /tmp/azk-agent-start.log 2>&1 &
AGENT_PID="$!"
tail -f /tmp/azk-agent-start.log &
TAIL_PID="$!"
echo "PIDS - agent: ${AGENT_PID}, tail: ${TAIL_PID}";
until tail -1 /tmp/azk-agent-start.log | grep -q 'Agent has been successfully started.'; do
sleep 2;