Skip to content

Instantly share code, notes, and snippets.

View kevinohara80's full-sized avatar

Kevin O'Hara kevinohara80

View GitHub Profile
@kevinohara80
kevinohara80 / child.js
Created July 25, 2012 00:53
killing a node.js child process with infinite loop
while(true) {
console.log('blah');
}
trigger OpportunityTrigger on Opportunity (before insert, before update, before delete,
after insert, after update, after delete, after undelete) {
(new OpportunityTriggerHandler()).run();
}
@kevinohara80
kevinohara80 / Async.cls
Created February 10, 2012 16:50
Pass sObjects into future methods for DML - Salesforce
/*
* Author: Kevin O'Hara
* Date: 02/10/2012
*
* Description: The Async class aims to circumvent a limitation of asynchronous (@future)
* methods in Salesforce. The current @future implementation will only allow for primitives
* or collections of primitives to be passed into an @future method. The Async class uses
* native JSON serialization/deserialization to allow for passing an SObject, or List<SObject>
* into an asynchronous method for DML operations. A helper method is also included for making
* the serialization processes simpler.
Initializing the backend...
Initializing provider plugins...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
2018/10/18 07:46:56 [INFO] Terraform version: 0.11.8
2018/10/18 07:46:56 [INFO] Go runtime version: go1.10.3
2018/10/18 07:46:56 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.8/bin/terraform", "apply", "-auto-approve", "-no-color"}
2018/10/18 07:46:56 [DEBUG] Attempting to open CLI config file: /Users/kevinohara/.terraformrc
2018/10/18 07:46:56 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/10/18 07:46:56 [INFO] CLI command args: []string{"apply", "-auto-approve", "-no-color"}
2018/10/18 07:46:56 [INFO] command: backend initialized: *gcs.Backend
2018/10/18 07:46:56 [DEBUG] checking for provider in "."
2018/10/18 07:46:56 [DEBUG] checking for provider in "/usr/local/Cellar/terraform/0.11.8/bin"
2018/10/18 07:46:56 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
@kevinohara80
kevinohara80 / gist:3095399
Created July 12, 2012 02:58
setTimeout infinite loop
var vm = require('vm');
var code = function run() {
for(var i=0; i<Infinity; i++) {
i++;
}
};
var sandbox = {
setTimeout: setTimeout
@kevinohara80
kevinohara80 / ambasaddor.log
Last active March 21, 2018 15:11
Ambassador logs
ambassador Mar 21, 2018, 11:07:27 AM AMBASSADOR: shutting down
ambassador Mar 21, 2018, 11:07:27 AM No config generated.
ambassador Mar 21, 2018, 11:07:27 AM ls: /etc/envoy*.json: No such file or directory
ambassador Mar 21, 2018, 11:07:27 AM Here's the envoy.json we were trying to run with:
ambassador Mar 21, 2018, 11:07:27 AM AMBASSADOR: kubewatch sync exited with status 1
ambassador Mar 21, 2018, 11:07:27 AM ValueError: Unable to generate config
ambassador Mar 21, 2018, 11:07:27 AM raise ValueError("Unable to generate config")
ambassador Mar 21, 2018, 11:07:27 AM File "/application/kubewatch.py", line 175, in generate_config
ambassador Mar 21, 2018, 11:07:27 AM config = self.generate_config(output)
ambassador Mar 21, 2018, 11:07:27 AM File "/application/kubewatch.py", line 118, in restart

Keybase proof

I hereby claim:

  • I am kevinohara80 on github.
  • I am kevohara (https://keybase.io/kevohara) on keybase.
  • I have a public key whose fingerprint is 0EE7 52BC A9E8 761A 09FF 479F 25A6 DA6B F317 63AF

To claim this, I am signing this object:

@kevinohara80
kevinohara80 / scrape.js
Created October 26, 2012 20:52
Simple node.js WSJ Prime Rate scraper web service
var express = require('express');
var http = require('http');
var path = require('path');
var request = require('request');
var $ = require('cheerio');
var WSJ_PRIME_URL = 'http://www.bankrate.com/rates/interest-rates/wall-street-prime-rate.aspx';
var app = express();
@kevinohara80
kevinohara80 / nforce-070-proposal.md
Created January 10, 2014 16:05
nforce 0.7.0 proposal

nforce 0.7.0

Overview / tl;dr

nforce 0.7.0's main goal is to introduce a new plugin system. In addition, I am proposing some breaking API changes that I believe will make nforce more flexible and make plugin authoring far easier.

I'm looking for feedback so please comment if you have anything to add.

Plugin System