Skip to content

Instantly share code, notes, and snippets.

View wprudencio's full-sized avatar
😁
Just happy!

Weslei Prudencio wprudencio

😁
Just happy!
View GitHub Profile
eval $(thefuck --alias)
if [ -z "$TMUX" ]
then
tmux attach -t TMUX || tmux new -s TMUX
fi
bindkey -v
bindkey '^R' history-incremental-search-backward
set relativenumber
set number
set wildmode=list:longest,full
syntax on
colorscheme desert
set ruler
" Use spaces instead of tabs
set expandtab
@wprudencio
wprudencio / checkBody.js
Created July 10, 2017 19:35
Check the body of a post request and save in a file
var express = require('express');
var app = express();
var bodyParser = require('body-parser')
var fs = require('fs');
// to support JSON-encoded bodies
// app.use(bodyParser.urlencoded({ // to support URL-encoded bodies
// extended: true
// }));
app.use(bodyParser.json({limit: '50mb'}));
@wprudencio
wprudencio / gist:82e591f13d69318a1be31fd635e16eff
Last active March 20, 2017 11:38
Annotations React native
## React Cheat Sheet
https://ihatetomatoes.net/wp-content/uploads/2017/01/react-cheat-sheet.pdf
## Project structure
https://github.com/BelinChung/react-native-hiapp
## Libs
https://github.com/airbnb/lottie-react-native Lib fantastica de animacoes
## Util Development
node_modules/.bin/sequelize db:migrate
node_modules/.bin/sequelize model:create --name Todo --attributes "title:string, complete:boolean,UserId:integer"
-------------
https://github.com/hokaccha/node-jwt-simple
https://jwt.io/introduction/
https://blog.jscrambler.com/implementing-jwt-using-passport/
https://github.com/themikenicholson/passport-jwt
http://stackoverflow.com/questions/17397052/nodejs-passport-authentication-token?noredirect=1&lq=1
http://stackoverflow.com/questions/20228572/passport-local-with-node-jwt-simple
http://mherman.org/
MacBooks-MacBook-Pro:lixo weslei$ ionic start cutePuppyPics --v2
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
Creating Ionic app in folder /Users/weslei/lixo/cutePuppyPics based on tabs project
var gulp = require('gulp');
replace = require('gulp-replace');
connect = require('gulp-connect');
gulp.task('hashReplace', function() {
gulp.src(['src/index.html'])
.pipe(replace('{{hash}}', guid()))
.pipe(gulp.dest('./'));
});
@wprudencio
wprudencio / gist:440a4f316a278c48b8f8
Last active January 26, 2016 02:24
Linux essencial
sudo apt-get install -y vlc build-essential aria2 arandr unp curl python-dev python-setuptools git libpq-dev libffi-dev
https://github.com/nvbn/thefuck
#java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
https://packagecontrol.io/installation
All autocomplete
AutoFileName
Angular JS
brackethighlighter
Docblockr
HTML-CSS-JS Prettify
Local History
Sidebarenhancements
SublimeLinter
SublimeLinter-jshint
@wprudencio
wprudencio / sheet_cheat.py
Created June 16, 2015 12:32
Django tutorial
##################### MODELS.PY ###########################
from django.db import models
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self): # __unicode__ on Python 2
return self.question_text