Skip to content

Instantly share code, notes, and snippets.

View carimura's full-sized avatar

Chad Arimura carimura

  • San Francisco, CA
View GitHub Profile
**Oracle Contributor Agreement**
This Oracle Contributor Agreement (“OCA”) applies to any contribution that you make to any product or project managed by us (the “project”),
and sets out the intellectual property rights you grant to us in the contributed materials. The term “us” shall mean Oracle International
Corporation. The term “you” shall mean the person or entity identified below. If you agree to be bound by these terms, fill in the information
requested below and sign the OCA where indicated below. Read this agreement carefully before signing. These terms and conditions
constitute a binding legal agreement.
1. The term 'contribution' or ‘contributed materials’ means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, or any other material posted or submitted by you to the project.
@carimura
carimura / gist:533fbccecb1e694813e8cc4af7304d4b
Last active September 1, 2017 15:09
Elon Musk Email to Employees re: Communication
Subject: Communication Within Tesla
There are two schools of thought about how information should flow within companies. By far the most common way is chain of command, which means that you always flow communication through your manager. The problem with this approach is that, while it serves to enhance the power of the manager, it fails to serve the company.
Instead of a problem getting solved quickly, where a person in one dept talks to a person in another dept and makes the right thing happen, people are forced to talk to their manager who talks to their manager who talks to the manager in the other dept who talks to someone on his team. Then the info has to flow back the other way again. This is incredibly dumb. Any manager who allows this to happen, let alone encourages it, will soon find themselves working at another company. No kidding.
Anyone at Tesla can and should email/talk to anyone else according to what they think is the fastest way to solve a problem for the benefit of the whole company. You
@carimura
carimura / gist:8aa6bd3f5ac21866f185e216bc19857a
Created August 2, 2017 20:24
kubernetes: get all pods grouped by nodes
kubectl get pods --all-namespaces -o json | jq '.items | map({podName: .metadata.name, nodeName: .spec.nodeName}) | group_by(.nodeName) | map({nodeName: .[0].nodeName, pods: map(.podName)})'
FROM iron/java
WORKDIR /worker
ADD . /worker
ENTRYPOINT ["java", "Worker101"]
require 'iron_mq'
require 'iron_cache'
require 'yaml'
require 'newrelic_platform'
def config; @config ||= YAML.load_file('./ironmq_agent.config.yml'); end
p @config
begin
require 'iron_worker_ng'
client = IronWorkerNG::Client.new
start = Time.now
tasks = !ARGV[0].nil? ? ARGV[0].to_i : 5
threads = !ARGV[1].nil? ? ARGV[1].to_i : 1
cluster = !ARGV[2].nil? ? ARGV[2].to_s : "default"
priority = !ARGV[3].nil? ? ARGV[3].to_i : 0
@carimura
carimura / gist:6f237c51385d78c6e720
Last active August 29, 2015 14:20
IronWorker 100-Runner Cluster

IronWorker 100-Runner Cluster

Required

  • API: EC2 Instances, 1-2 r3.large
  • Database: MongoDB Database
  • Runners: EC2 Instances, 4 r3.large
  • Code Packages: AWS S3 or similar compatib storage
  • IronMQ Backend: EC2 Instances, 2-3 c3.xlarge
curl -L http://bit.ly/10hA8iC | bash
@carimura
carimura / gist:7523120
Created November 18, 2013 05:50
Programming Comcast Controller for AppleTV
#*Step By Step Instruction*
##Set Apple TV to Aux Keys
--
Press Aux (Device) Button
Hold Setup Key until Aux Button Blinks Twice
Type in code 31115 (Aux Button will blink twice, if it is a long blink try last three steps again)
##Fix Play and Pause Keys
--
runtime 'ruby'
exec 'hello_world.rb'
remote
gem 'nokogiri'