Skip to content

Instantly share code, notes, and snippets.

@nrollr
nrollr / MySQL.md
Last active October 28, 2020 02:53
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

@doismellburning
doismellburning / userstories.md
Last active October 30, 2017 16:25
Conference User Stories
@softwarespot
softwarespot / pubsub.md
Last active September 13, 2015 17:09 — forked from learncodeacademy/pubsub.js
PubSub module in vanillaJS
@garthk
garthk / profile
Created June 21, 2015 23:51
boot2docker 1.7.0 cert fix
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?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>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@elvetemedve
elvetemedve / Arch Linux, Fedora
Last active December 31, 2021 11:30
Allow Vagrant usage without providing sudo password
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL
#
# Arch Linux, Fedora sudoers entries
#
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
@marcus-at-localhost
marcus-at-localhost / feiertage.class.php
Last active February 7, 2018 10:46
Simple German holidays helper class with DateTime Class (Deutsche Feiertage)
<?php
class Holidays
{
public static function getEaster()
{
$easter = new DateTime('now');
$year = $easter->format('Y');
$easter->setDate($year, 3, 21);
$easter->setTime(0, 0, 0);
@ShawnMcCool
ShawnMcCool / gist:c1e7b62e94ab58f6e8d0
Last active August 29, 2015 14:14
Why a closure is called a closure.
// An anonymous function written in lambda syntax:
x => x + 1
val func = x => x + 1
func(3) // returns 4
// In this case, the lambda `x => x + 1` relies on NO external data.
// It's fundamentally complete. X is provided as an argument to the function.
@lrytz
lrytz / z-automator.png
Last active February 4, 2023 21:20
Shortcut for Syntax Highlighting in Keynote
@lerua83
lerua83 / calculateGermanHolidays.php
Created November 13, 2013 12:46
Der folgende Codeschnipsel enthält keinerlei Überprüfungen der übergebenen Parameter, diese sollten für den produktiven Einsatz noch nachgepflegt werden. Wie man sieht, ist die Berechnung von Wochendenden und Feiertagen recht einfach. Diese Berechnung kann man sicherlich auch schnell in anderen Programmiersprachen abbilden.
function freierTag($tag, $monat, $jahr)
{
// Parameter in richtiges Format bringen
if(strlen($tag) == 1) {
$tag = "0$tag";
}
if(strlen($monat) == 1) {
$monat = "0$monat";
}