Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # Note, I call my fork 'origin' and the owner's fork 'upstream'. | |
| # this syncs your current branch with that of upstream/master | |
| rewind = reset --hard upstream/master | |
| # make log output pleasing to the eye. | |
| log = log --oneline --graph --pretty=format:'%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]' --decorate --all | |
| # this destroys a branch locally and remotely. Must not be the active branch. | |
| nuke = "!sh -c 'git branch -D $1 && git push origin :$1' -" |
| // thanks to @kakashiAL from #node.js on freenode | |
| function getDataA(data) { | |
| return new Promise (function(res,rej) { | |
| res(data); | |
| }) | |
| } | |
| function getDataB(data) { | |
| return new Promise (function(res,rej) { |
| //Install Macports. | |
| //Install aircrack-ng: | |
| sudo port install aircrack-ng | |
| //Install the latest Xcode, with the Command Line Tools. | |
| //Create the following symlink: | |
| sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
| //Figure out which channel you need to sniff: | |
| sudo airport -s | |
| sudo airport en1 sniff [CHANNEL] |
| # Install `dnsmasq` and configure for *.dev domains | |
| $ brew install dnsmasq | |
| $ vim /usr/local/etc/dnsmasq.conf | |
| # Reload configuration and clear cache | |
| $ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ dscacheutil -flushcache |
| #!/bin/sh | |
| # | |
| # chmodr.sh | |
| # | |
| # author: Francis Byrne | |
| # date: 2011/02/12 | |
| # | |
| # Generic Script for recursively setting permissions for directories and files | |
| # to defined or default permissions using chmod. | |
| # |
| #!/bin/bash | |
| # Argument = -t test -r server -p password -v | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| This script run the test1 or test2 over a machine. |
| # Note, use at your own peril. | |
| # Will test a set of ports so that anybar instance not created with unfree port. | |
| # silent. | |
| for i in {1738..1740}; do | |
| netstat -ln | grep -q $i | |
| [ ! $? -eq 0 ] && ANYBAR_PORT=$i open -na AnyBar | |
| done | |
| # https://github.com/tonsky/AnyBar |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/bin/bash | |
| # 'pax' is simply an alias for one my ssh connections, | |
| # which are configured in your user ssh_config file. | |
| # For more info, see Julian Simioni's original post: | |
| # https://juliansimioni.com/blog/howto-access-a-linux-machine-behind-a-home-router-with-ssh-tunnels/ | |
| relay_server="pax" | |
| createTunnel() { |
| #!/usr/bin/env bash | |
| # Thanks to @samsonjs for the cleaned up version: | |
| # https://gist.github.com/samsonjs/4076746 | |
| PREFIX=$HOME/local | |
| VERSION=1.2.6 | |
| # Create Source Directory | |
| mkdir -p $PREFIX/src |