Easy to remember, easy to forget.
It's nice to be able to run subl
in a terminal.
Easy to remember, easy to forget.
It's nice to be able to run subl
in a terminal.
Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault :
bash <(curl -Ls http://git.io/eUx7rg)
However, at the time of writing the script is not compatible with OS X El Capitan (10.11)
An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"
Make sure Homebrew has the latest formulae, so run brew update
first
#!/bin/bash | |
# source: https://github.com/docker/toolbox/blob/master/osx/uninstall.sh | |
# Uninstall Script | |
if [ "${USER}" != "root" ]; then | |
echo "$0 must be run as root!" | |
exit 2 | |
fi |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css"> | |
<textarea #simplemde></textarea> |
#!/bin/sh | |
test_document="{ | |
\"text\": \"HEAR the sledges with the bells, / Silver bells! / What a world of merriment their melody foretells! / How they tinkle, tinkle, tinkle, / In the icy air of night! / While the stars, that oversprinkle / All the heavens, seem to twinkle / With a crystalline delight; / Keeping time, time, time, / In a sort of Runic rhyme, / To the tintinnabulation that so musically wells / From the bells, bells, bells, bells, / Bells, bells, bells— / From the jingling and the tinkling of the bells.\" | |
}" | |
if curl -fs -X HEAD localhost:9200/top-terms; then | |
echo "Clear the old test index" | |
curl -X DELETE localhost:9200/top-terms; echo "\n" | |
fi |
#!/bin/bash | |
#script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/ | |
#tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/ | |
cd /usr/share/fonts/truetype/ | |
#TODO: put validation if folder already exists | |
sudo mkdir ttf-monaco |
declare module "bignumber.js" { | |
class BigNumber { | |
constructor(value: number|string); // Acccepts a number OR a string | |
toNumber(): number; | |
// Those static attributes could have been in the module, a few lines beneath | |
static ROUND_DOWN: any; | |
static config(arg: any): void; | |
} |
var Bar1 = base => class extends base { | |
componentWillMount(){ | |
super.componentWillMount(); | |
console.log('Bar1'); | |
} | |
}; | |
var Bar2 = base => class extends base { | |
componentWillMount(){ | |
super.componentWillMount(); |