Skip to content

Instantly share code, notes, and snippets.

View tiste's full-sized avatar
💡
crafting

Baptiste Lecocq tiste

💡
crafting
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tiste on github.
  • I am tiste (https://keybase.io/tiste) on keybase.
  • I have a public key ASCtgkFUNUcgM77gjZxyU2KuDbrxuwX9qyJlNEsDXRKzdgo

To claim this, I am signing this object:

@tiste
tiste / .bashrc
Last active March 1, 2018 09:49
Git aliases (from zsh)
g=git
ga='git add'
gaa='git add --all'
gb='git branch'
gba='git branch -a'
gbda='git branch --merged | command grep -vE "^(\*|\s*master\s*$)" | command xargs -n 1 git branch -d'
gbnm='git branch --no-merged'
gbr='git branch --remote'
gc='git commit -v'
'gc!'='git commit -v --amend'
@tiste
tiste / ecosystem.json
Last active August 29, 2015 14:10
ecosystem.json
{
"apps": [{
"name": "iwishit",
"script": "app.coffee",
"env_production": {
"NODE_ENV": "production"
}
}],
"deploy": {
"production" : {
@tiste
tiste / gulpfile.coffee
Last active August 29, 2015 14:06
gulpfile.coffee
require('dotenv').load()
gulp = require('gulp')
runSequence = require('run-sequence')
clean = require('gulp-clean')
connect = require('gulp-connect')
modRewrite = require('connect-modrewrite')
sftp = require('gulp-sftp')
usemin = require('gulp-usemin')
jade = require('gulp-jade')
@tiste
tiste / plugin.js
Last active August 29, 2015 14:03
How to create a javascript plugin w/ callbacks
function Module(foo, bar) {
this.foo = foo;
this.bar = bar;
}
Module.prototype.getData = function(fooFunc) {
if (!fooFunc || typeof fooFunc !== 'function')
return;
if (this.foo == '' || this.bar == '') {
@tiste
tiste / setup_capistrano.md
Last active August 29, 2015 14:01
Setup Capistrano 3
cap install
cap production deploy:check
cap production nginx:setup
cap production nginx:reload
cap production unicorn:setup_initializer
cap production unicorn:setup_app_config

Then cap production deploy and on the server side (for the first time):

@tiste
tiste / bootstrap_symfony.md
Last active August 29, 2015 14:00
Bootstrap a Symfony app

Bootstrap Symfony app

composer create-project symfony/framework-standard-edition appname
cd appname
rm -rf app/logs/* app/cache/*
chmod 777 app/logs && chmod 777 app/cache
rm -rf src/Acme
@tiste
tiste / bootstrap_rails.md
Last active June 6, 2016 08:47
Bootstrap a Rails app

Bootstrap Rails app

Generate app

rails new appname -d mysql
cd appname
git init
touch .ruby-gemset && touch .ruby-version
echo 'appname' >> .ruby-gemset
echo '2.2' >> .ruby-version
@tiste
tiste / vim.md
Created October 2, 2013 15:51 — forked from m3nd3s/NERDTree.mkd
Vim cheat sheet

Cursor movement

h - move left
j - move down
k - move up
l - move right
% - jump to matching brace
w - jump by start of words (punctuation considered words)
W - jump by words (spaces separate words)