Skip to content

Instantly share code, notes, and snippets.

View gembin's full-sized avatar
🎯
Focusing

gembin

🎯
Focusing
  • Seattle, WA
View GitHub Profile
@gembin
gembin / pedantically_commented_playbook.yml
Created February 1, 2016 18:12 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@gembin
gembin / gist:0aef0ae7770f6e3fbebc
Created February 15, 2016 09:10 — forked from kchida/gist:d1c15f3968f4f8272c49
etcd vs consul vs ???
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
@gembin
gembin / gist:f855dce496a1a341da06
Created February 18, 2016 16:52 — forked from rednaxelafx/gist:925323
Correspondence between Sun/Oracle JDK, OpenJDK and HotSpot VM versions

Correspondence between Sun/Oracle JDK, OpenJDK and HotSpot VM versions

build date Sun/Oracle JDK Version OpenJDK Version HotSpot VM Version
2006-11-29 1.6.0-b105 1.6.0-b105
2007-03-14 1.6.0_01-b06 1.6.0_01-b06
2007-06-22 1.6.0_02-b05 1.6.0_02-b05
2007-09-24 1.6.0_03-b05 1.6.0_03-b05
2007-12-14 1.6.0_04-b12 10.0-b19
@gembin
gembin / whatimdoing.yaml
Created March 9, 2016 17:14 — forked from ForbiddenEra/whatimdoing.yaml
my cloud-configz yo
#cloud-config
ssh_authorized_keys:
- ssh-rsa key
write_files:
- path: /opt/cloud-config.yml
permissions: 0644
content: |
#cloud-config
@gembin
gembin / user_data.sh
Created March 9, 2016 17:14
Custom IP Resolution with Cloud-Config
#!/bin/sh
workdir=$(mktemp --directory)
trap "rm --force --recursive ${workdir}" SIGINT SIGTERM EXIT
cat >"${workdir}/cloud-config.yml" <<EOF
#cloud-config
coreos:
etcd:
@gembin
gembin / README.md
Created March 21, 2016 08:08 — forked from mhausenblas/README.md
Kubernetes debugging session leveraging labels

That's our RC:

$ cat ws-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: webserver-rc
spec:
  replicas: 5

selector:

@gembin
gembin / rust-robotics-libraries.md
Created November 11, 2016 16:58 — forked from ClintLiddick/rust-robotics-libraries.md
Rust Libraries for Robotics

Motivation

tl;dr I want to use Rust to program robots. Help me find the best core libraries to build on.

Robotic systems require high performance and reliability, but also have enormous complexity in terms of algorithms employed, number of subsystems, embedded hardware control, and other metrics. Development is mostly split between C++ for performance and safety critical components, and MatLab or Python for quick research or task iteration.

@gembin
gembin / pr.md
Created November 18, 2016 13:52 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@gembin
gembin / nohup-output-to-file.sh
Created November 28, 2016 05:25 — forked from umidjons/nohup-output-to-file.sh
Redirect nohup output to a file
# redirect output and errors into file output.log:
nohup some_command > output.log 2>&1&
# abbreviated syntax for bash version >= ver.4:
nohup some_command &> output.log
@gembin
gembin / AnnotationTypeInformationMapper.java
Created December 29, 2016 10:34 — forked from athlan/AnnotationTypeInformationMapper.java
Spring Data Mongo custom _class value
package selly.spring.data.convert;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.config.BeanDefinition;