Skip to content

Instantly share code, notes, and snippets.

@ar1g
ar1g / MySQL.md
Created August 18, 2016 16:50 — forked from nrollr/MySQL.md
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

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)

Install MySQL using Homebrew

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

@ar1g
ar1g / upgradeCasks.sh
Created December 7, 2015 21:57
upgrade casks
# 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: "
@ar1g
ar1g / updateBrew.sh
Created October 17, 2015 00:14
update homebrew (el capitan permissions)
#! /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
@ar1g
ar1g / osx_install.sh
Created October 5, 2015 23:33 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/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)"
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
@ar1g
ar1g / fib.js
Last active August 29, 2015 14:17
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);
<?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>
@ar1g
ar1g / updatebrew.sh
Last active August 29, 2015 14:16 — forked from tjluoma/updatebrew.sh
#!/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"
@ar1g
ar1g / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console