Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@Couto
Couto / Preferences.sublime-settings
Created July 29, 2012 17:19
Sublime Text 2 - User Preferences
// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Themes/Espresso Soda/Espresso Soda.tmTheme",
// Note that the font_face and font_size are overriden in the platform
@Couto
Couto / jpp.js
Created August 6, 2012 15:21
Javascript Preprocessor
#!/usr/bin/env node
/*!
* Javascript Preprocessor
* Mimicks the #include syntax in C
*
* @example
*
* //#include "relative/folder/file.js";
@Couto
Couto / DOMElementCreate.js
Created September 5, 2012 14:17
create DOM Elements through a CSS Selector
/**
* $$ - Creates a DOM Element with the given attributes
*
* @author Luis Couto <couto@15minuteslate.net> (https://github.com/Couto)
* @license MIT (http://couto.mit-license.org)
*
* @function
* @param {String} selector CSS Selector representing the HTML and attributes
* @returns {Node} HTML Element
*
@Couto
Couto / raspberrypi_archlinux.md
Last active August 27, 2017 17:06
Raspberry Pi with ArchLinux
@Couto
Couto / gist:3851777
Created October 8, 2012 10:02
DocBlockr Configuration
{
// If true, when in a docblock, pressing tab after a @tag line (like @param, @return)
// will indent to the description. This is useful if you are writing a long description
// and want that block of text to stay aligned.
"jsdocs_deep_indent": true,
// If true, then pressing enter while in a double-slash comment (like this one)
// will automatically add two slashes to the next line as well
"jsdocs_extend_double_slash": true,
@Couto
Couto / gist:3901178
Created October 16, 2012 18:47
awkward command
externify: {
command: 'find ./out -name \"*.html\" -exec sed -E -i "" "s/imgs\\/(.*\\.(jpg|png))/http:\\/\\/domain.net\\/email_test\\/\\1/g" {} \\;',
stdout: true,
failOnError: true
}
/**
* __series
* Given an array of functions, it will call every function,
* once at a time, sequentially.
* Every function will have a trigger function as its last argument,
* that should be called when the function is done.
* If arguments are given to this trigger function, those will be passed
* to the next function.
*
* @example
/**
* http://www.w3.org/TR/CSS2/visuren.html#relative-positioning
*
*/
.outer {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
@Couto
Couto / Custom.css
Created December 17, 2012 09:54 — forked from lightyrs/Custom.css
/*
Chrome Developer Tools - Monokai Color Theme
Author: Béres Máté Csaba / bjmatt.com / @bjmatt / beres.mate@bjmatt.com
-----------------------------------------------------------------------------------------------------------
Installation:
1. Find your Chrome's user stylesheets directory:
@Couto
Couto / quicksort.js
Last active December 10, 2015 14:08
/**
* QuickSort
*
* @param {Array} arr Array to be sorted
* @returns {Array} new array sorted
*/
var quickSort = function (arr) {
'use strict';
var sort = function (arr) {