This file contains 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
private function arrayToXML($data, &$xml) | |
{ | |
foreach ($data as $key => $value) { | |
if (is_array($value)) { | |
if (is_numeric($key)) { | |
$key = 'item'.$key; //dealing with <0/>..<n/> issues | |
} | |
$subnode = $xml->addChild($key); | |
array_to_xml($value, $subnode); | |
} else { |
This file contains 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
# Reduce dock show/hide time | |
defaults write com.apple.dock autohide-delay -int 0 | |
defaults write com.apple.dock autohide-time-modifier -float 0.4 | |
killall Dock | |
# Set a blazingly fast keyboard repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 2 | |
defaults write NSGlobalDomain InitialKeyRepeat -int 10 | |
# Screeshots in jpg |
This file contains 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
// includes() polyfill for strings | |
if (!String.prototype.includes) { | |
String.prototype.includes = function(search, start) { | |
'use strict'; | |
if (typeof start !== 'number') { | |
start = 0; | |
} | |
if (start + search.length > this.length) { | |
return false; |
OlderNewer