Skip to content

Instantly share code, notes, and snippets.

View smashwilson's full-sized avatar
🤖
HAPPINESS IS MANDATORY

Ash Wilson smashwilson

🤖
HAPPINESS IS MANDATORY
  • GitHub Staff
  • 17:27 (UTC -04:00)
View GitHub Profile
@jlord
jlord / Readme.md
Last active February 15, 2020 19:52

Add these fun keyboard shortcuts to your system! Works especially well if you're writing @muan a lot (◍•ᴗ•◍)♡

Here's how on OS X:

Press cmd + space and search and open System Preferences, then select Keyboard, then Text ヽ(´∇`)ノ

img

Note

@coreypobrien
coreypobrien / add2dm.sh
Created September 28, 2015 20:00
add2dm.sh
#!/bin/bash -e
NAME=$1
DM_DIR=~/.docker/machine/machines/$NAME
if [ "$2" != "" ]; then
unzip -qojd add2dm-tmp $2
trap "rm -rf $(pwd)/add2dm-tmp" EXIT
pushd add2dm-tmp > /dev/null
fi
# containers
cf.containers.create("new_container")
cf.containers.create("new_container", metadata: { "you're on your own here bud": "because you wanted all of the power" }) # Should we even offer metadata mutation at create time????
container = cf.containers["my-test-dir"]
container.delete
# metadata (Hash-like protocol)
container.metadata # Return a Hash of the metadata less the X-Container-Meta- prefixes
container.metadata["price"] = "4.20"
container.metadata.delete("price")
@ardcore
ardcore / atom-events
Last active October 13, 2021 20:35
atom.io events
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
@atiaxi
atiaxi / post-receive
Created December 18, 2013 21:56
post-receive
#!/bin/sh
sudo /sbin/stop valkyribot
GIT_WORK_TREE=/var/valkyribot git checkout -f
# Perform any necessary migrations
git rev-parse --verify HEAD > /var/faceless-games/valkyribot/VERSION
cd /var/valkyribot
/usr/local/bin/alembic --config=/etc/chromabot/alembic.ini upgrade head
# Bump the server
sudo /sbin/start valkyribot
@jamiehannaford
jamiehannaford / switch.sh
Created September 6, 2013 12:32
The convention for Go working environments is to clump everything in one "Gopath" - which kind of acts as a universal environment. But I don't like that; if I'm working on multiple Git projects, I might want a completely separate environment with separate packages and a src directory just for my project. Maybe I'm wrong but this seems to work. N…
#!/bin/bash
subdir=${1%/}
if [ ! $subdir ]; then
echo "Please specify an argument"
exit
fi
dir="${PWD}/$subdir"
@aliang
aliang / Mac SSH Autocomplete
Created June 14, 2011 07:14
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh