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 | |
| // Use in the "Post-Receive URLs" section of your GitHub repo. | |
| if ( $_POST['payload'] ) { | |
| shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
| } | |
| ?>hi |
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 slug($str, $cat=false) { | |
| $ene = ($cat === true) ? 'ny' : 'n'; | |
| $str = (function_exists('mb_strtolower')) ? mb_strtolower($str, 'UTF-8') : strtolower($str); | |
| $str = preg_replace('(à|á|â|ã|ä|å)', 'a', $str); | |
| $str = preg_replace('(è|é|ê|ë)', 'e', $str); | |
| $str = preg_replace('(ì|í|î|ï)', 'i', $str); | |
| $str = preg_replace('(ò|ó|ô|õ|ö|ø|ō)', 'o', $str); | |
| $str = preg_replace('(ù|ú|û|ü|ū)', 'u', $str); |
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
| // Documented by Stoyan Stefanov: https://www.facebook.com/note.php?note_id=10151176218703920 | |
| (function() { | |
| var url = 'http://example.org/js.js'; | |
| var iframe = document.createElement('iframe'); | |
| (iframe.frameElement || iframe).style.cssText = | |
| "width: 0; height: 0; border: 0"; | |
| iframe.src = "javascript:false"; | |
| var where = document.getElementsByTagName('script')[0]; | |
| where.parentNode.insertBefore(iframe, where); | |
| var doc = iframe.contentWindow.document; |
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
| import {Injectable, EventEmitter} from 'angular2/core'; | |
| @Injectable() | |
| export class EmitterService { | |
| private static _emitters: { [ID: string]: EventEmitter<any> } = {}; | |
| static get(ID: string): EventEmitter<any> { | |
| if (!this._emitters[ID]) | |
| this._emitters[ID] = new EventEmitter(); | |
| return this._emitters[ID]; |
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 | |
| // curl -sS https://getcomposer.org/installer | php | |
| // php composer.phar require aws/aws-sdk-php | |
| // export AWS_ACCESS_KEY_ID=... | |
| // export AWS_SECRET_ACCESS_KEY=... | |
| $queueUrl = '<INSERT_URL_OF_EXISTING_QUEUE_HERE>'; |