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 Mailer | |
{ | |
protected $to = array(); | |
protected $cc = array(); | |
protected $bcc = array(); | |
protected $reply = array(); | |
protected $files = array(); |
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 | |
$log = new \Monolog\Logger('MyApplication'); | |
$log->pushHandler(new \Monolog\Handler\FirePHPHandler(\Monolog\Logger::DEBUG)); | |
\Sauce\Config::set('logger', $log); |
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 class="github-widget" data-repo="pateketrueke/habanero"></div> | |
<script src="https://raw.github.com/JoelSutherland/GitHub-jQuery-Repo-Widget/master/jquery.githubRepoWidget.min.js"></script> |
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
# taken from https://github.com/mauricemach/coffeekup | |
(($) -> | |
cache = {} | |
params = {} | |
params.locals = {} | |
params.format = on |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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($, undefined) { | |
$ujs = { | |
token: $('meta[name=csrf-token]').attr('content'), | |
fire: function(obj, name, data) { | |
var evt = $.Event(name); | |
obj.trigger(evt, data); | |
return evt.result !== 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
// font-face mixin | |
.font(@path, @family, @weight: normal, @style: normal) { | |
@eot: asset-path("@{path}.eot"); | |
@woff: asset-path("@{path}.woff"); | |
@ttf: asset-path("@{path}.ttf"); | |
@svg: asset-path("@{path}.svg"); | |
@font-face { | |
src: url('@{eot}'); | |
src: local("☺"), |
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 | |
OPTIONS='-avlzC --progress --exclude-from exclude.txt --stats' | |
TRANSPORT='ssh -p 22' | |
CONNECTION='[email protected]' | |
REMOTE_PATH='/var/www' | |
eval "rsync $OPTIONS -e '$TRANSPORT' . $CONNECTION:$REMOTE_PATH" |
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 region($from) | |
{ | |
static $url = 'http://www.geoiptool.com/?IP=%s'; | |
$html = file_get_contents(sprintf($url, $from)); | |
$html = strip_tags($html, '<a><span>'); |
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 | |
# through DSN | |
$db = connect(...); | |
$tbl = 'my_table'; | |
$col = 'my_column'; | |