Skip to content

Instantly share code, notes, and snippets.

View wookiehangover's full-sized avatar
💭
just setting up my gthb...

Sam Breed wookiehangover

💭
just setting up my gthb...
View GitHub Profile
@wookiehangover
wookiehangover / gist:3029899
Created July 1, 2012 22:39
OpDemand Setup

Project Setup

  • install node v0.6.19

  • git clone [email protected]:opdemand/c2-frontend.git

  • change lines 12 & 13 of proxy.js to point to the dev server

      host: 'c2-dev.opdemand.com',
      port: 80
    

Since these first views you'll be working on don't require log-in, let's

var swfUrl = 'http://static.pbsrc.com/flash/onSiteVideo.swf';
var flashvars = {
file: this.currentTarget.fullsizeUrl,
  os: 1,
  ap: 1
};
var params = {
wmode: "transparent",
  allowScriptAccess: "always",
UNCAUGHT: exception 'Zend_Db_Adapter_Mysqli_Exception' with message 'Connection refused' in /home/frog/hg/partner-ad2/lib/Zend/Db/Adapter/Mysqli.php:333
Stack trace:
#0 /home/frog/hg/partner-ad2/lib/Core/Dao/Mysqli/MysqliAdapter.php(31): Zend_Db_Adapter_Mysqli->_connect()
#1 /home/frog/hg/partner-ad2/lib/Zend/Db/Adapter/Abstract.php(860): Core\Dao\Mysqli\MysqliAdapter->_connect()
#2 /home/frog/hg/partner-ad2/lib/Zend/Db/Adapter/Abstract.php(930): Zend_Db_Adapter_Abstract->quote('ronco23', NULL)
#3 /home/frog/hg/partner-ad2/lib/Zend/Db/Select.php(1000): Zend_Db_Adapter_Abstract->quoteInto('username = ?', 'ronco23', NULL)
#4 /home/frog/hg/partner-ad2/lib/Zend/Db/Select.php(475): Zend_Db_Select->_where('username = ?', 'ronco23', NULL, true)
#5 /home/frog/hg/partner-ad2/lib/Core/Dao/Operation/Db/Select.php(629): Zend_Db_Select->where('username = ?', 'ronco23', NULL)
#6 /home/frog/hg/partner-ad2/lib/Pb/Dao/User/UserDao.php(51): Core\Dao\Operation\Db\Select->where('username = ?', 'ronco23')
#7 /home/frog/hg/partner
@wookiehangover
wookiehangover / gist:3266276
Created August 5, 2012 17:51
Uploads Formidable file objects to S3, save to redis
// Uploads Formidable file objects to S3, save to redis
//
// TODO - add image processing task
var fs = require('fs');
var s3 = require('knox').createClient();
var redis = require('redis');
var client = redis.createClient();
function update( data, cb ){
npm http GET https://isaacs.iriscouch.com/registry/_design/app/_rewrite/read/-/read-1.0.3.tgz
npm ERR! fetch failed https://isaacs.iriscouch.com/registry/_design/app/_rewrite/read/-/read-1.0.3.tgz
npm http GET https://isaacs.iriscouch.com/registry/_design/app/_rewrite/read/-/read-1.0.3.tgz
npm ERR! fetch failed https://isaacs.iriscouch.com/registry/_design/app/_rewrite/read/-/read-1.0.3.tgz
npm ERR! Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! at ClientRequest.<anonymous> (/Users/sam/Developer/.nvm/v0.8.6/lib/node_modules/npm/node_modules/request/main.js:440:26)
npm ERR! at ClientRequest.g (events.js:185:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:88:17)
npm ERR! at HTTPParser.parserOnIncomingClient (http.js:1455:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
exception 'Exception' with message 'Invalid path: /albums' in /Users/sam/dev/photobucket/pbtng/lib/Pb/Model/Path/PBPath.php:77
Stack trace:
#0 /Users/sam/dev/photobucket/pbtng/lib/Pb/Model/Path/PBPath.php(48): Pb\Model\Path\PBPath->parsePath()
#1 /Users/sam/dev/photobucket/pbtng/lib/Pb/Model/Path/PBPath.php(223): Pb\Model\Path\PBPath->__construct('/albums')
#2 /Users/sam/dev/photobucket/pbtng/lib/Pb/Dao/Filesystem/AlbumFilesystemDao.php(274): Pb\Model\Path\PBPath->getParentPath()
#3 /Users/sam/dev/photobucket/pbtng/lib/Pb/Dao/Filesystem/AlbumFilesystemDao.php(38): Pb\Dao\Filesystem\AlbumFilesystemDao->filesystemElementForPath(Object(Pb\Model\Path\PBPath))
#4 /Users/sam/dev/photobucket/pbtng/lib/Pb/Dao/Album/AlbumDao.php(200): Pb\Dao\Filesystem\AlbumFilesystemDao->findByPath(Object(Pb\Model\Path\PBPath))
#5 /Users/sam/dev/photobucket/pbtng/lib/Pb/Service/Album/AlbumService.php(96): Pb\Dao\Album\AlbumDao->findByOwnerAndPath(Object(Pb\Model\User\User), Object(Pb\Model\Path\PBPath))
#6 /Users/sam/dev/photobucket/
[2012-08-31T11:50:41-06:00][ef693ace] WARN (Pb\Service\ActivityStream\ActivityStreamService) "Error publishing activity stream event: exception 'Zend_Queue_Exception' with message 'Could not write to any server for activity' in /Users/sam/dev/photobucket/pbtng/lib/ZendPb/Queue/Adapter/Kestrel.php:403
Stack trace:
#0 /Users/sam/dev/photobucket/pbtng/lib/ZendPb/Queue/Adapter/Fanout.php(280): ZendPb_Queue_Adapter_Kestrel->send('{"time":1346435...', NULL)
#1 /Users/sam/dev/photobucket/pbtng/lib/Zend/Queue.php(416): ZendPb_Queue_Adapter_Fanout->send('{"time":1346435...')
#2 /Users/sam/dev/photobucket/pbtng/lib/Pb/Service/ActivityStream/ActivityStreamService.php(225): Zend_Queue->send('{"time":1346435...')
#3 [internal function]: Pb\Service\ActivityStream\{closure}(Object(Zend2\EventManager\Event))
#4 /Users/sam/dev/photobucket/pbtng/lib/Zend2/EventManager/EventManager.php(465): call_user_func(Object(Closure), Object(Zend2\EventManager\Event))
#5 /Users/sam/dev/photobucket/pbtng/lib/Zend2/EventManager/EventManager
@wookiehangover
wookiehangover / events.js
Created September 6, 2012 04:33
An EventEmitter you can use in the client
define(function(){
function EventEmitter(){}
var isArray = typeof Array.isArray === 'function'
? Array.isArray
: function (xs) {
return Object.prototype.toString.call(xs) === '[object Array]'
}
;
@wookiehangover
wookiehangover / wo0kie.zsh-theme
Created September 7, 2012 18:53
wo0kie.zsh-theme
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
PROMPT='
%{$fg[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg[blue]%}%m%{$reset_color%}: %{${fg[green]}%}%~%{$reset_color%}$(git_prompt_info)
%{${fg[$CARETCOLOR]}%}∴ %{${reset_color}%}'
RPROMPT='%{$fg[magenta]%} %W - %*%{$reset_color%}'