Skip to content

Instantly share code, notes, and snippets.

View devdiva's full-sized avatar

Hari Khalsa devdiva

View GitHub Profile
# To Be Reseached & Developed List
Drinking at the firehose of information will leave you feeling clobbered and still thirsty.
To manage my own focus, this is a list of things on my radar for further exploration, research and development.
## Active
I have current projects, reading and experiments related to:
@devdiva
devdiva / Three Wise Monkeys.md
Created May 22, 2016 02:03
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

# Official instructions here: https://getcomposer.org/download/
# See official instructions for the latest version of the following commands
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === 'fd26ce67e3b237fffd5e5544b45b0d92c41a4afe3e3f778e942e43ce6be197b9cdc7c251dcde6e2a52297ea269370680') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }"
# For the setup command, use the following arguments in order to add the command to local bin
php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@devdiva
devdiva / ruby_server_1_liners.rb
Last active December 20, 2017 20:12
1-liners for Ruby local servers (not rails). I use these for tutorials, quick access to demo front-end code, etc.
#
# The simplest one liners are using ruby/lib/un.rb methods.
#
# @n0kada and @tenderlove's one liner is darn simple, but doesn't play nice with my OSX's ruby 1.8.7 defaults.
# Set your local rubies to 1.9.3 or greater (which you should be running anyway) and it's all good.
ruby -run -e httpd . -p 5000
#
@devdiva
devdiva / votes_controller.rb
Created November 19, 2011 22:36
Missing Code for Lesson 14
# The following step on the curriculum is missing some code
# http://railsbridge-curriculum.heroku.com/14
# This is for the 11/19/2011 session
#Add the following method to Vote in app/controllers/votes_controller.rb:
class VotesController < ApplicationController
def create
topic = Topic.find(params[:topic_id])
vote = topic.votes.build
vote.save!
@devdiva
devdiva / UsersController.rb
Created June 22, 2011 20:37
ApiInfusionsoft error "undefined method `api_perform' for nil:NilClass"
class UsersController < ApplicationController
include ApiInfusionsoft
def index
@users = User.all
infuser = api_data_query(:Contact,1,0,{:Id=>3674}, ["Id", "FirstName", "LastName"])
print "\n infuser #{infuser.inspect}"