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
| #!/usr/bin/python | |
| import smtplib | |
| import sys | |
| from email.MIMEMultipart import MIMEMultipart | |
| from email.MIMEBase import MIMEBase | |
| from email.MIMEText import MIMEText | |
| from email import Encoders | |
| import os |
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 | |
| // Input files to be included in the zip. Should perform sanity check on this | |
| $files_to_package = array('catalog.pdf', '3dview.dwg'); | |
| bring_files_locally_from_cloud_files_if_we_dont_have_a_local_cache_of_the_file($files_to_package); // nodoc :), @todo implement | |
| // This file will be deleted once the PHP process ends | |
| $zip_path = tmpfile(); |
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
| public function dispatchAppServer($context) { | |
| $_ENV = $_SERVER = $context['env']; | |
| @parse_str($_ENV['QUERY_STRING'], $_GET); | |
| $_GET['ak'] = $_ENV['PATH_INFO']; | |
| Ak::unsetStaticVar('AkRequestSingleton'); |
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
| parse_git_branch (){ | |
| [`pwd | grep "work|Sites|Projects"` != ""] && git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(git:\1)/' | |
| } | |
| parse_hg_branch() { | |
| [`pwd | grep "work|Sites|Projects"` != ""] && hg branch 2> /dev/null | sed -e 's/\(.*\)/(hg:\1)/' | |
| } | |
| PS1='\[\033[0;33m\]\w\[\033[00m\]\[\033[01;00m\]$(parse_git_branch)$(parse_hg_branch): ' |
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 | |
| class AppLogger | |
| { | |
| protected $fp = null; | |
| public static function log($message, $priority = 'info', $namespace = 'app') | |
| { | |
| if(sfConfig::get('app_loggers_'.$namespace) !== false) | |
| { |
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
| app.get('/help', function(req, res){ | |
| res.send('some help'); | |
| }); | |
| app.search('/search/:query/p:page', function(req, res){ | |
| var query = req.params.query | |
| , page = req.params.page; | |
| res.send('search "' + query + '", page ' + (page || 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
| <?php | |
| namespace CHH; | |
| trait MetaObject | |
| { | |
| protected static $metaClass; | |
| static function setMetaClass(MetaClass $metaClass) | |
| { |
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 EventEmitter() { | |
| this._listeners = {}; | |
| } | |
| exports.EventEmitter = EventEmitter; | |
| EventEmitter.prototype.listeners = function(event) { | |
| if (!this._listeners[event]) { | |
| this._listeners[event] = []; | |
| } | |
| return this._listeners[event]; |
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
| var app = require('../app'); | |
| console.log(); | |
| app.routes.all().forEach(function(route){ | |
| console.log(' \033[90m%s \033[36m%s\033[0m', route.method.toUpperCase(), route.path); | |
| }); | |
| console.log(); | |
| process.exit(); |
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 | |
| os=${OSTYPE//[0-9.-]*/} | |
| case "$os" in | |
| darwin) | |
| echo "I'm a Mac" | |
| ;; | |
| msys) |
OlderNewer