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 | |
| $cfg['ShowPhpInfo'] = true; | |
| $cfg['TitleTable'] = '@SERVER@ - @DATABASE@ - @TABLE@'; | |
| $cfg['TitleDatabase'] = '@SERVER@ - @DATABASE@'; | |
| $cfg['TitleServer'] = '@SERVER@'; | |
| $cfg['TitleDefault'] = '@SERVER@'; | |
| // 2 Hours Till Auto-Logout |
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/sh | |
| # | |
| # chkconfig: 35 99 99 | |
| # description: Node.js /home/nodejs/sample/app.js | |
| # | |
| . /etc/rc.d/init.d/functions | |
| USER="nodejs" |
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
| Add this style | |
| <style type="text/css"> | |
| .ui-loader-background { | |
| background: rgba(0, 0, 0, 0.5); | |
| width:100%; | |
| height:100%; | |
| top:0; | |
| margin: 0; | |
| display:none; | |
| position: fixed; |
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 | |
| # install homebrew's official php tap | |
| brew tap josegonzalez/homebrew-php | |
| # install homebrew-dupes (required to install zlib, php54's dependency) | |
| brew tap homebrew/dupes | |
| # install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
| brew install nginx mysql |
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
| #Xcode Command line tools | |
| xcode-select --install | |
| #install the brewery before brewing | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
| # install homebrew's official php tap | |
| brew tap josegonzalez/homebrew-php | |
| # install homebrew-dupes (required to install zlib, php54's dependency) |
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
| function randomString(len){ | |
| var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; | |
| var string_length = len; | |
| var randomstring = ''; | |
| for (var i=0; i<string_length; i++) { | |
| var rnum = Math.floor(Math.random() * chars.length); | |
| randomstring += chars.substring(rnum,rnum+1); | |
| } | |
| return randomstring; | |
| } |
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
| <div><input type="text" id="search" placeholder="Search" /></div> | |
| <div> | |
| <ul id="item-container"> | |
| <li class="items">Apple</li> | |
| <li class="items">Orange</li> | |
| <li class="items">Grapes</li> | |
| <li class="items">Banana</li> | |
| </ul> | |
| </div> |
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
| #make sure that you have updated tzdata | |
| yum update tzdata | |
| #check list of timezone | |
| ls /usr/share/zoneinfo/ | |
| #replace the localtime with the new one | |
| ZONEINFO=Asia/Manila | |
| ln -sf /usr/share/zoneinfo/$ZONEINFO /etc/localtime |
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
| //replace string in files | |
| grep -rlw 'old-word' * | xargs -i@ sed -i 's/old-word/new-word/g' @ |
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 | |
| function human_filesize($bytes, $decimals = 2) { | |
| $sz = 'BKMGTP'; | |
| $factor = floor((strlen($bytes) - 1) / 3); | |
| return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; | |
| } |