Skip to content

Instantly share code, notes, and snippets.

sh -c "`curl -fsSL http://get.docker.com`"
sudo curl -L https://github.com/docker/compose/releases/download/`
curl -s https://api.github.com/repos/docker/compose/releases/latest |\
grep "tag_name" |\
cut -d '"' -f 4
`/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
@aidant
aidant / README.md
Last active July 24, 2023 01:02
Useful find and replace regex

Replace import with require()

Find

import ([A-Za-z_]+|{ ?([a-zA-Z_]+,? ?)+ ?}) from (\'[a-z-_0-9\.\/-]+\');?

Replace

const $1 = require($3)

Replace require() with import

Find

const ([A-Za-z_]+|\{ ?([a-zA-Z_]+,? ?)+ ?\}) = require\(('[a-z-_0-9\.\/-]+')\);?

Replace
@aidant
aidant / setup.sh
Last active September 9, 2017 15:33
#!/bin/bash
sudo -v
if test ! $(which brew)
then
echo "Installing Homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi