Skip to content

Instantly share code, notes, and snippets.

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

Mateus Vahl mateusvahl

🏠
Working from home
View GitHub Profile
For JS:
+ /project-root
|--+ /dist Packaged stuff
|--+ /build Compiled stuff
|--+ /bin Sometimes these things have executables
|--+ /src Source stuff
| |--+ /stylus
| |--+ /scripts All JavasScript/LiveScript stuff
| | |--+ index.js Entry point to the application
@mateusvahl
mateusvahl / at.sjs
Created December 31, 2014 12:24
`@` alias to `this` with Sweet.js
/**
Sweet.js version: 0.7.2
`this` nickname `@`
Expected:
@ -> this
@something -> this.something
example:
var twitterStrategy = require('passport-twitter').Strategy;
var facebookStrategy = require('passport-facebook').Strategy;
// Tem que criar um APP no twitter/facebook pra ter a chave publica e a secreta
//
var config = require('../config/passport');
var twConfig = {
consumerKey: config.twitter.key,
consumerSecret: config.twitter.secret,
callbackURL: '/auth/twitter/callback',
@mateusvahl
mateusvahl / gist:2310fee42ba99941f3e3
Last active August 29, 2015 14:14
Gulp + React + Browserify + 6to5
var gulp = require('gulp');
var browserify = require('browserify');
var reactify = require('reactify');
var source = require('vinyl-source-stream');
var to5ify = require('6to5ify');
gulp.task('scripts', function() {
browserify({
insertGlobals: true,
entries: ['./src/index.jsx'],
line 116
PS1="\w \$ λ "
@mateusvahl
mateusvahl / gist:d81651924897326118ec
Created April 28, 2015 23:55
xorg-server-dependencies
sudo apt-get remove libpixman-1-dev x11proto-gl-dev libx11-dev libgl1-mesa-dev x11proto-xf86dri-dev libgcrypt11-dev x11proto-xcmisc-dev x11proto-randr-dev x11proto-render-dev x11proto-video-dev x11proto-composite-dev x11proto-record-dev x11proto-scrnsaver-dev libxfont-dev libxkbfile-dev x11proto-xinerama-dev x11proto-resource-dev x11proto-xf86bigfont-dev x11proto-bigreqs-dev libpciaccess-dev
sudo apt-get install libgl1-mesa-dri-lts-trusty:i386 libgl1-mesa-glx-lts-trusty:i386 libc6:i386
@mateusvahl
mateusvahl / gist:2711e8d73f53bda480dc
Created May 8, 2015 22:58
linux npm install without sudo
npm config set prefix '~/.npm-packages'
echo 'export PATH="$PATH:$HOME/.npm-packages/bin"' >> ~/.bashrc
sudo apt-get install gstreamer1.0-plugins-bad gstreamer1.0-fluendo-mp3 gstreamer1.0-plugins-ugly
sudo apt-get install libgl1-mesa-dev x11proto-xf86dri-dev libgcrypt11-dev x11proto-xcmisc-dev x11proto-randr-dev x11proto-render-dev x11proto-video-dev libxfont-dev x11proto-composite-dev x11proto-scrnsaver-dev libxkbfile-dev x11proto-xinerama-dev x11proto-resource-dev x11proto-record-dev x11proto-bigreqs-dev