Skip to content

Instantly share code, notes, and snippets.

View krujos's full-sized avatar

Joshua Kruck krujos

  • The Home Depot
  • Austin TX
View GitHub Profile

tmux cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am krujos on github.
  • I am krujos (https://keybase.io/krujos) on keybase.
  • I have a public key whose fingerprint is 00E3 37A8 EB67 FB39 40BC C251 DCB6 BAFB 6CA7 484A

To claim this, I am signing this object:

/**
* Checks if everything except id's and results are equal!
* An example of using the stream operator and a couple of gauva and apache
* language extensions to implement an equality check. We create a pair for
* each thing we want to compare then stream through and assert that
* everything matches the equality test. We use the hash code in the
* equality test as it's a little less finicky for equality tests. This is a
* pretty expensive and heavy weight implementation, not because of the
* functional stuff, but because of all the intermediary objects created. As
* this is example code we don't sweat the efficiency. A simpler
@krujos
krujos / convert.sh
Created November 13, 2014 02:09
Convert a directory full of tiffs to png
for f in *.tiff ; convert $f `(echo $f | sed -e 's/tiff/png/') `;
@krujos
krujos / sprint-boot-default-logger
Created December 20, 2014 01:08
Java log getter that i can never remember
import org.apache.log4j.Logger;
public class RedisCloudConfig extends AbstractCloudConfig {
private Logger log = Logger.getLogger(RedisCloudConfig.class);
//...
}
@krujos
krujos / OpsMgr export & Alias
Created January 17, 2015 22:55
Export and alias to have bosh command "just work"
export BUNDLE_GEMFILE=/home/tempest-web/tempest/web/bosh.Gemfile
alias bosh='bundle exec bosh'
@krujos
krujos / cf-manifest.yml
Created February 20, 2015 02:50
bosh lite yaml
compilation:
cloud_properties:
name: random
network: cf1
reuse_compilation_vms: true
workers: 6
director_uuid: cf8dc1fc-9c42-4ffc-96f1-fbad983a6ce6
jobs:
- default_networks:
- name: cf1
@krujos
krujos / example.java
Created March 16, 2015 19:56
ResponseEntity<?>
@RequestMapping(value = BASE_PATH + "/{instanceId}", method = RequestMethod.GET)
public ResponseEntity<?> getServiceInstance(
@PathVariable("instanceId") String instanceId) {
logger.debug("GET: " + BASE_PATH + "/{instanceId}"
+ ", getServiceInstance(), serviceInstanceId = " + instanceId);
ServiceInstance instance = service.getServiceInstance(instanceId);
if (null == instance) {
@krujos
krujos / two CF Instances at once.
Last active August 29, 2015 14:18
targeting two CF instances at once
➜ bosh-lite git:(master) CF_HOME=/tmp/cf2 cf login -a https://api.10.244.0.34.xip.io -u admin -p admin --skip-ssl-validation
API endpoint: https://api.10.244.0.34.xip.io
Authenticating...
OK
Targeted org jdk-org
Targeted space jdk-space
@krujos
krujos / cf getting started
Last active August 29, 2015 14:19
CF Pregame
#install CF CLI (https://console.run.pivotal.io/tools)
$ git clone https://github.com/krujos/investigator
$ cd investigator
$ cf login -a https://api.run.pivotal.io -u <email> -o hd-testdrive -s development
$ cf push investigator-<your name> --random-route -m 128M
#So for josh k, the command is "cf push investigator-josh --random-route -m 128M"
$ curl <whatever url push dumped out>/env
# So for josh k it was "curl investigator-jdk-compurgatorial-tormentor.cfapps.io"