Skip to content

Instantly share code, notes, and snippets.

New OS X Computer Setup

Below are the programs I install, the Preferences I change, and the configurations I tweak after doing a fresh install of OS X 10.11.

Homebrew / Cask

http://brew.sh/

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@theissn
theissn / in_array_r.php
Last active July 18, 2017 18:36
PHP fint in multi dimen.. arr
function in_array_r($needle, $haystack, $strict = false) {
foreach ($haystack as $item) {
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
return true;
}
}
return false;
}
// ==UserScript==
// @name Github Sidebar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match // ==UserScript==
// @name Github Sidebar
// @namespace http://tampermonkey.net/
// @version 0.1
https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-12418-5.svg
@theissn
theissn / setup.md
Created June 22, 2018 00:44
Setup New Machine

MYSQL 8+ Password issue

ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword'

<?php
error_reporting(E_ALL); // Error engine - always ON!
ini_set('display_errors', FALSE); // Error display - OFF in production env or real server
ini_set('log_errors', TRUE); // Error logging
ini_set('error_log', 'your/path/to/errors.log'); // Logging file
@theissn
theissn / states.json
Created August 13, 2019 09:31
US states
{
"AL": "Alabama",
"AK": "Alaska",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"FL": "Florida",