Skip to content

Instantly share code, notes, and snippets.

View LeoFNaN's full-sized avatar

Leo F LeoFNaN

View GitHub Profile
@adamtomat
adamtomat / browser-sync-alias.md
Last active February 25, 2018 14:56
Bash Alias for Browser Sync

Wash your hands of remembering the command to proxy a url through Browser Sync

Usage:

$ sink localhost:4001

Instead of:

$ browser-sync start --proxy "localhost:4001" --files "css/*.css"
@mAAdhaTTah
mAAdhaTTah / 1_netatalk-3-install-on-ubuntu-14.04.sh
Last active December 11, 2019 16:20 — forked from beshkenadze/1_netatalk-3-install-on-debian-7
Shell script to install Netatalk 3 on Ubuntu 14.04
# Get root:
sudo su
# Install prerequisites:
apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev
# Build libevent from source:
cd /usr/local/src
@msurguy
msurguy / eloquent.md
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@justintv
justintv / .bashrc
Created August 17, 2009 00:53
Display git branch in bash prompt
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"