Skip to content

Instantly share code, notes, and snippets.

View zombiesplat's full-sized avatar

Alan Asher zombiesplat

  • Asterisk Pound
  • AZ
View GitHub Profile
@zombiesplat
zombiesplat / git-prompt
Created December 13, 2017 04:19
Mac Colorized Git Prompt
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
LIGHT_BLUE="\[\033[0;36m\]"
@zombiesplat
zombiesplat / flatten_example.php
Last active January 12, 2019 23:01
array flatten
<?php
function flatten($input) {
$return = new StdClass();
$return->flat = [];
array_walk_recursive(
$input,
function($item, $key, $userdata) {
$userdata->flat[] = $item;
},
$return
*.7z
*.bak
*.class
*.com
*.css.map
*.dll
*.dmg
*.exe
*.gz
*.iml