Skip to content

Instantly share code, notes, and snippets.

Looks like you have Homebrew installed. We will install all required packages via Homebrew.
Traceback (most recent call last):
File "bootstrap.py", line 142, in <module>
sys.exit(main(sys.argv))
File "bootstrap.py", line 133, in main
dasboot.bootstrap()
File "/var/folders/ms/dxlzmm8j2zld20k_ps_kgl3m0000gn/T/tmpNteoUf/mozboot/bootstrap.py", line 90, in bootstrap
global TEMPDIR
File "/var/folders/ms/dxlzmm8j2zld20k_ps_kgl3m0000gn/T/tmpNteoUf/mozboot/base.py", line 221, in ensure_mercurial_modern
@kivi
kivi / callback_recursion.coffee
Created September 6, 2012 16:42
callback_recursion
windows = [1,2,3]
work_with = (value) ->
console.log "VALUE: #{value}"
do_array = (my_array, callback) ->
if my_array.length > 0
work_with my_array.shift()
@kivi
kivi / sequelize_dao.js
Created September 4, 2012 12:53
Wip for using validator within sequelize, when creating or modifying.
// if an array with field names is passed to save()
// only those fields will be updated
DAO.prototype.save = function(fields) {
var self = this
, values = fields ? {} : this.values
, updatedAtAttr = this.__options.underscored ? 'updated_at' : 'updatedAt'
, createdAtAttr = this.__options.underscored ? 'created_at' : 'createdAt'
// --- validation START
@kivi
kivi / collecttion-json-template-options.md
Created August 21, 2012 12:20 — forked from mrdevinmob/collecttion-json-template-options.md
collection-json extension template options

Template Options

Support template data options by adding property attribute with an array of text and values. Additionally add a multiple property, which indicates multiple values are suppored if set to "true".

  1. Add an optional property to the data object: options (array of objects. text/value pair)

    • the "text" property would indicate the text to be displayed in client.
    • the "value" property would indicate the value associated with the text above. This is the what the client should return to to the API in a POST or PUT request.
  2. Add an optional property to the data object: multiple (boolean).

@kivi
kivi / collecttion-json-template-otpions.md
Created August 21, 2012 11:11
collection-json extension template options

Template Data Validation

Support template data options by adding property attribute with an array of prompt and value. Additionally add a muliple property, which indicates multiple values are suppored if set "true".

  1. Add an optional property to the data object: option (array of and object. prompt/value pair)
  2. Add an optional property to the data object: multiple (boolean). This property has no impact if option property is not set.
{ "collection" :
@kivi
kivi / deploy.sh
Created July 23, 2012 20:42
deploy node project
# we should create a user and run ast the new user.
# following commands executed as root
mkdir tmp
rsync -avz /var/lib/jenkins/jobs/tm-api/workspace/ /tmp/tm-api
# use nvm
. /var/lib/jenkins/.nvm/nvm.sh
nvm
nvm use v0.8.1
@kivi
kivi / Guardfile
Created January 26, 2012 20:59
Guardfile
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/routes.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile')
<?
// this command uses the Notification Service
class ActivityStreamUpdaterCommand extends ContainerAwareCommand
{
private $silentMode;
private function sendOutNotification($action, $payload, $user, $actorIdentifier, $actorName)
{
if ($user->getUsername() != $actorIdentifier) {