I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| <?php | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
| set nocompatible " Disable vi-compatibility | |
| set t_Co=256 | |
| colorscheme xoria256 | |
| set guifont=menlo\ for\ powerline:h16 | |
| set guioptions-=T " Removes top toolbar | |
| set guioptions-=r " Removes right hand scroll bar | |
| set go-=L " Removes left hand scroll bar | |
| set linespace=15 |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| [mergetool] | |
| prompt = false | |
| keepBackup = false | |
| keepTemporaries = false | |
| [merge] | |
| tool = winmerge | |
| [mergetool "winmerge"] | |
| name = WinMerge |
| <?php | |
| // http://www.php.net/manual/en/function.get-browser.php#101125 | |
| function getBrowser() { | |
| $u_agent = $_SERVER['HTTP_USER_AGENT']; | |
| $bname = 'Unknown'; | |
| $platform = 'Unknown'; | |
| $version= ""; | |
| // First get the platform? | |
| if (preg_match('/linux/i', $u_agent)) { |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| $config['views_path'] = APPPATH . 'views/blade/'; | |
| $config['cache_path'] = APPPATH . 'cache/blade/'; |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| #!/usr/bin/python | |
| # Equivalent of "tail -f" as a webpage using websocket | |
| # Usage: webtail.py PORT FILENAME | |
| # Tested with tornado 2.1 | |
| # Thanks to Thomas Pelletier for it's great introduction to tornado+websocket | |
| # http://thomas.pelletier.im/2010/08/websocket-tornado-redis/ | |
| import tornado.httpserver |