This file contains 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
virtualtour=> \d+ tour_event | |
Table "public.tour_event" | |
Column | Type | Modifiers | Storage | Stats target | Description | |
--------------------+-----------------------------+-----------------------------------------------------------------------------------+----------+--------------+------------- | |
tour_event_id | integer | not null default nextval(('public.tour_event_tour_event_id_seq'::text)::regclass) | plain | | | |
tour_event_type_id | integer | not null | plain | | | |
tour_id | integer | not null | plain | | | |
visitor_id | text | |
This file contains 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
// Example of a promise that could be used to wrap bracketed capture | |
import Foundation | |
import BrightFutures | |
func grabBrackets (n:Int) -> Future<[AnyObject]> { | |
let promise = Promise<[AnyObject]>() | |
var data = [AnyObject]() |
This file contains 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 | |
require 'conf/webapp.conf'; | |
$sessionTableName = ''; | |
$sessionLifetime = ini_get('session.gc_maxlifetime'); | |
$sdir = '/opt/www/domains/tourbuzz/runtime/sessions'; // hard-code so it still works after switching live to dynamo | |
$awsKey = ''; | |
$awsSecretKey = ''; |
This file contains 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 | |
register_shutdown_function(function() { | |
$f = '/tmp/last-request-' . microtime(true) . '.sh'; | |
$rawData = json_decode(file_get_contents("php://input")); | |
$url = $_SERVER['REDIRECT_SCRIPT_URI']; | |
$requestData = http_build_query($_REQUEST); | |
$postData = NULL; |
This file contains 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
vim '+set nomore' +BundleInstall! +BundleClean +qa | |
# nomore prevents the pager from getting hung at the "-- More --" prompt. |
This file contains 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
$sc = ShellCommand::create() | |
->addCommand("echo HI") | |
; | |
$j = new RemoteShellCommandJob($sc); | |
$j->webhookThen( | |
array('MyPromiseHandler', 'success'), | |
array('MyPromiseHandler', 'error'), | |
array('MyPromiseHandler', 'notify') | |
); |
This file contains 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
# iterm escape code to allow clipboard integration | |
https://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
# do this in a non-screen terminal, it works! | |
printf "\e]50;CopyToClipboard\a...followed by text followed by...\e]50;EndCopy\a" && echo && echo 'clip...' && pbpaste | |
# problems | |
1. vim --version | |
-> -clipboard -xterm_clipboard | |
2. passing thru escape sequence in screen. maybe via termcap? or some other "carve out" for that escape sequence? |
This file contains 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
my apps' composer.json: | |
{ | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/apinstein/Propel" | |
} | |
], | |
"require": { | |
"swiftmailer/swiftmailer": "v5.0.2", |
This file contains 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/zsh -f | |
echo yay! |
This file contains 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
// do it live: http://jsfiddle.net/apinstein/2kR2c/1/ | |
// in DOM | |
<div ng-controller="MyCtrl"> | |
<p ng-click="bumpA()">a: {{a}}</p> | |
<p ng-click="bumpB()">b: {{b}}</p> | |
<p>a^2 = {{aSquared}}</p> | |
<p>a + b = {{aPlusB}}</p> | |
</div> |