Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / post-merge
Last active February 14, 2024 06:20
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@PseudoSky
PseudoSky / .bash_profile
Last active December 12, 2017 04:19
dot files and environment (you should NEVER blindly use peoples dot files)
export PATH=/usr/local/lib:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
. ~/dot/snowbash
. ~/dot/completions
genpath
export PATH="/usr/local/bin:$PATH";
export NODE_ENV="development"
export NVM_DIR="/usr/local/nvm"
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active April 22, 2024 21:03
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@PseudoSky
PseudoSky / Default (OSX).sublime-keymap
Last active September 26, 2018 03:35
Sublime Key Bindings
[
{
"keys": ["option+i"],
"args": null,
"command": "swap_case"
},
{
"keys": ["option+="],
"command": "show_overlay",