Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/usr/bin/env bash | |
NC='\033[0m' # No Color | |
YELLOW='\033[0;33m' | |
CYAN='\033[0;36m' | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
MAGENTA='\033[0;35m' | |
notify_about_actions_required() { | |
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)" |
# permanent apple keyboard keyswap | |
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf | |
update-initramfs -u -k all | |
# Temporary & instant apple keyboard keyswap | |
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd | |
# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super) | |
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
<? | |
/** | |
* Pretty Errors | |
* | |
* ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### | |
* | |
* WARNING! It is downright _DANGEROUS_ to use this in production, on | |
* a live website. It should *ONLY* be used for development. | |
* | |
* Pretty Errors allows the outside world to alter your project, |
/* | |
* SWFUpload adapter for Ext | |
* Author: Chris Alfano ([email protected]) - Sep 06,2009 | |
* Author: Henry Paradiz ([email protected]) - June 17, 2011 - Upgraded to Ext 4 | |
* | |
* See SWFUpload documentation: http://demo.swfupload.org/Documentation/#settingsobject | |
*/ | |
// REQUIRES THIS EXTERNAL FILE: //name: 'SWFUpload' | |
//,URL: '/jslib/SWFUpload/swfupload.js' // need to figure out how to dynamically load this with Extjs4 |