Skip to content

Instantly share code, notes, and snippets.

View AnalogJ's full-sized avatar
🔥
Why is everything always broken?

Jason Kulatunga AnalogJ

🔥
Why is everything always broken?
View GitHub Profile
@dillera
dillera / graphite-centos6-install.txt
Created January 18, 2012 17:59
Install Graphite 0.9.9 and Statsd on Centos 6
# FOR CENTOS 6
# Andrew Diller Jan 2012
# Get EPEL Repo installed
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
vi /etc/yum.repos.d/epel.repo
@cwjohnston
cwjohnston / Berksfile
Created April 23, 2013 14:39
sensu full stack in a vagrant box drop these puppies in the sensu-chef repo
site :opscode
metadata
cookbook 'redis',
git: 'git://github.com/miah/chef-redis.git'
cookbook 'monitor',
git: 'git://github.com/portertech/chef-monitor.git'
@echohack
echohack / artifactory_secret_api.py
Last active December 17, 2015 20:09
Artifactory Secret Build Info API.
def create_build_info(self, build_name, build_number, dependencies, build_dependencies):
"""
Returns a build info dictionary which is formated to correctly deploy
a new build to artifactory.
Make a put request with this build info to api/build
"""
build_info = {'version': '1.0.1',
'name': build_name,
'number': str(build_number),
'type': 'GENERIC',
@IntuitDeveloperRelations
IntuitDeveloperRelations / V2-QBO-Item-Filter-V2SDK-DevDefined.cs
Last active December 19, 2015 21:59
DevDefined / IPP .NET DevKit v2 - QBO - Get Items with DateTimeFilter #DotNetDevKitV2 #Item #Filter
//List<Item> items = GetQboItemsWithDateTimeFiler(commonService, 1, 100, new DateTime(2013, 6, 30, 11, 0, 0));
public List<Intuit.Ipp.Data.Qbo.Item> GetQboItemsWithDateTimeFiler(DataServices dataServices, int startPage, int resultsPerPage, DateTime filterCreateTimeAfter)
{
var filter = "CreateTime :AFTER: " + filterCreateTimeAfter.ToString("yyyy-MM-dd\"T\"HH:mm:sszzz");
var httpWebRequest = WebRequest.Create(dataServices.ServiceContext.BaseUrl + "items/v2/" + dataServices.ServiceContext.RealmId) as HttpWebRequest;
if (httpWebRequest != null)
{
@treyrich
treyrich / Example.js
Last active May 30, 2017 20:36
This is an AngularJS provider to communicate with a Sails.js backend via Socket.IO.After searching for way too long for a way to interface with the Sails.js client-side SDK included in new Sails projects via AngularJS I decided to write a drop in replacement for the AngularJS $http provider.Although this isn't a full replacement it includes a nu…
angular.module("MyApp", ["SocketProvider"])
.controller("MyController", ["$scope", "socket", function($scope, socket) {
// Fetch initial data
$scope.person = null;
socket.get("/person/1").success(function(data) {
$scope.person = data;
}).error(function() {
@bkutil
bkutil / deploy.rb
Created December 4, 2011 22:22 — forked from andruby/deploy.rb
Start and Stop tasks for resque workers and resque scheduler with capistrano deploy hook (without God)
after "deploy:symlink", "deploy:restart_workers"
after "deploy:restart_workers", "deploy:restart_scheduler"
##
# Rake helper task.
# http://pastie.org/255489
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/
def run_remote_rake(rake_cmd)
rake_args = ENV['RAKE_ARGS'].to_s.split(',')
@jotto
jotto / google_oauth2_access_token.rb
Created June 14, 2012 21:15
ruby command line script for generating google oauth2 access token
# (create oauth2 tokens from Google Console)
client_id = ""
client_secret = ""
# (paste the scope of the service you want here)
# e.g.: https://www.googleapis.com/auth/gan
scope = ""
@anhnt
anhnt / Account.js
Created January 7, 2014 10:02
Passport authenticate with SailsJS (v0.98)
// api/models/Account.js
module.exports = {
attributes: {
acct_id: {
type: 'int',
primaryKey: true
},
loginName: {
type: 'string',
@jkrems
jkrems / generators.md
Last active February 24, 2020 19:09
Generators Are Like Arrays

In all the discussions about ES6 one thing is bugging me. I'm picking one random comment here from this io.js issue but it's something that comes up over and over again:

There's sentiment from one group that Node should have full support for Promises. While at the same time another group wants generator syntax support (e.g. var f = yield fs.stat(...)).

People keep putting generators, callbacks, co, thunks, control flow libraries, and promises into one bucket. If you read that list and you think "well, they are all kind of doing the same thing", then this is to you.

@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">