playing with blocks
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://stackoverflow.com/a/32234553 | |
brew-cask-upgrade() { | |
if [ "$1" != '--continue' ]; then | |
echo "Removing brew cache" | |
rm -rf "$(brew --cache)" | |
echo "Running brew update" | |
brew update | |
fi | |
for c in $(brew cask list); do | |
echo -e "\n\nInstalled versions of $c: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/bash | |
echo "1. chown SIP affected directories." | |
echo "see https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/El_Capitan_and_Homebrew.md" | |
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local | |
echo "\n2. update homebrew." | |
brew update | |
echo "\n3. upgrade packages." | |
brew upgrade | |
echo "\n4. cleanup." | |
brew cleanup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary of my perl5 (revision 5 version 18 subversion 2) configuration: | |
Platform: | |
osname=darwin, osvers=14.0, archname=darwin-thread-multi-2level | |
uname='darwin osx228.apple.com 14.0 darwin kernel version 14.0.0: tue jun 2 11:49:04 pdt 2015; root:xnu-2782.1.97.1.3~1development_x86_64 x86_64 ' | |
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc' | |
hint=recommended, useposix=true, d_sigaction=define | |
useithreads=define, usemultiplicity=define | |
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef | |
use64bitint=define, use64bitall=define, uselongdouble=undef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
pool = require('threads_a_gogo').createPool(5).all.eval(fib); | |
function fib(n) { | |
return (n < 2) ? 1 : (fib(n-2)+fib(n-1)); | |
} | |
var server = http.createServer(function(req, res) { | |
pool.any.eval('fib('+req.url.replace('/', '')+')', function(err, data) { | |
res.writeHead(200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin</string> | |
</dict> | |
<key>Label</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh -f | |
NAME="$0:t:r" | |
export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin | |
(brew update && \ | |
brew upgrade && \ | |
brew doctor) 2>&1 |\ | |
tee -a "$HOME/Library/Logs/$NAME.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder