This file contains hidden or 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
| <?php | |
| if( !function_exists('apache_request_headers') ) { | |
| function apache_request_headers() { | |
| $arh = array(); | |
| $rx_http = '/\AHTTP_/'; | |
| foreach($_SERVER as $key => $val) { | |
| if( preg_match($rx_http, $key) ) { | |
| $arh_key = preg_replace($rx_http, '', $key); | |
| $rx_matches = array(); | |
| // do some nasty string manipulations to restore the original letter case |
This file contains hidden or 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
| zend_extension="/usr/lib/php/20151012/xdebug.so" | |
| xdebug.default_enable = 1 | |
| xdebug.idekey = "vagrant" | |
| xdebug.remote_enable = 1 | |
| xdebug.remote_autostart = 0 | |
| xdebug.remote_port = 9000 | |
| xdebug.remote_handler=dbgp | |
| xdebug.remote_log="/var/log/xdebug/xdebug.log" | |
| xdebug.remote_host=10.0.2.2 ; IDE-Environments IP, from vagrant box. | |
| xdebug.show_local_vars=1 |
This file contains hidden or 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
| Sublime 4 | |
| -------------- | |
| set_ui theme | |
| TrailingSpaces | |
| Rainbow CSV | |
| Sublime 3 | |
| -------------- | |
| SideBarEnhancements | |
| BracketHighlighter |
This file contains hidden or 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
| SELECT group_concat(distinct column_name) as fields | |
| FROM information_schema.columns | |
| WHERE table_name='table_name' and column_name like 'text%' INTO @COLUMNS; | |
| SET @s = CONCAT('SELECT ',@COLUMNS,' FROM table_name limit 10'); | |
| PREPARE stmt FROM @s; | |
| EXECUTE stmt; | |
| -- DEALLOCATE PREPARE stmt; |
This file contains hidden or 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
| apt-get update | |
| apt-get install libtool bison byacc flex autoconf libssl-dev openssl qt5-default build-essential cmake libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev build-essential checkinstall cmake pkg-config yasm libtiff4-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev unzip git wget vim | |
| mkdir gsoap | |
| cd gsoap | |
| wget http://downloads.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.29.zip?r=&ts=1459146537&use_mirror=ufpr | |
| unzip gsoap_2.8.29.zip?r= | |
| cd gsoap-2.8/ | |
| ./configure |
This file contains hidden or 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
| defaults write com.apple.desktopservices DSDontWriteNetworkStores true | |
| $ find . -iname ".DS_Store" -exec rm -f {} \; |
This file contains hidden or 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
| defaults write com.apple.desktopservices DSDontWriteNetworkStores true |
This file contains hidden or 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
| Output: | |
| lero lero | |
| lero lero | |
| bla bla bla (ASSET ID: 85) time 12 | |
| comando 2>&1 | sed -E 's,.+: ([0-9]+)\).+,\1,g' | tail -n1 | |
| Resultado: | |
| 85 |
This file contains hidden or 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
| #!/bin/bash | |
| touch file_sizes.csv | |
| OLDIFS=$IFS | |
| IFS=";" | |
| FILE_SIZES="file_sizes.csv" | |
| RIGHT_SIZE="0" | |
| while read ID FILE PATH SIZE |
This file contains hidden or 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
| #!/bin/bash | |
| result=`ps aux | grep -i "/path/file.php args" | grep -v "grep" | wc -l` | |
| if [ $result -eq 0 ] | |
| then | |
| php /path/file.php args >> /path/file.log & | |
| fi |