Skip to content

Instantly share code, notes, and snippets.

View matheuslc's full-sized avatar
🏠
Working from home

Matheus Carmo matheuslc

🏠
Working from home
View GitHub Profile
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@matheuslc
matheuslc / main.js
Last active December 21, 2015 10:39
Change the div height.
(function(){
var size = document.height;
document.getElementById('all').style.height = size;
}());
@matheuslc
matheuslc / gist:6320884
Last active December 21, 2015 14:39
Semantic Grid Resposive Example
// Importa o Semantic.grid, no caso estou importanto a versão SASS.
@import '../semantic-grid/stylesheets/scss/grid.scss';
$columns: 12;
$column-width: 60;
$gutter-width: 0;
// Responsivo
$total-width: 100%;
@matheuslc
matheuslc / structure
Created October 18, 2013 20:12
Structure example
project
--images
--scripts
----main.scss
--styles
----_variables.scss
----_fonts.scss
----_global.scss
----_section1.scss
----_section2.scss
// Name: Zombie Grid
// Author: Matheus Lucca do Carmo / me@matheuslc.com
// Version: 0.0.1
//--------------------------------------------
//
// Variables
//--------------------------------------------
@matheuslc
matheuslc / gist:8478578
Created January 17, 2014 18:13
Zombie Grid done
// Name: Zombie Grid
// Author: Matheus Lucca do Carmo / me@matheuslc.com
// Version: 0.0.1
//--------------------------------------------
//
// Variables
//--------------------------------------------
$grid-columns: 12; // Set your columns
projectname
css
sass
_mixins.scss
_variables.scss
_globall.scss
_media.scss (media queries)
_grid.scss
_main.scss (arquivo que uso só para @include)

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
@matheuslc
matheuslc / .ccscomb.json
Created May 5, 2014 12:39
A CCSComb Sublime plugin template
{
"always-semicolon": true,
"block-indent": 4,
"colon-space": true,
"color-case": "lower",
"color-shorthand": true,
"combinator-space": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,