Skip to content

Instantly share code, notes, and snippets.

View pires's full-sized avatar
🇵🇹

Pires pires

🇵🇹
View GitHub Profile
@pires
pires / .tmux.conf.local
Last active December 22, 2022 10:19
Set-up new Mac
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
@pires
pires / keybase.md
Created July 13, 2017 15:07
keybase.md

Keybase proof

I hereby claim:

  • I am pires on github.
  • I am pires (https://keybase.io/pires) on keybase.
  • I have a public key whose fingerprint is 5184 6FFF BDE8 700D 43EB D33F D561 A571 7E43 56B0

To claim this, I am signing this object:

@pires
pires / README.md
Last active July 13, 2016 17:10
Kubernetes #28617

Secret:

$ kubectl create secret generic test --from-literal f1=v1 --from-literal f2=123 --from-literal f3=123456

Deployment

$ kubectl create -f deployment.yaml
@pires
pires / kube-apiserver
Created April 15, 2015 21:08
kubernetes flags 0.15.0
kube-apiserver \
--allow_privileged=true \
--insecure_bind_address=0.0.0.0 \
--insecure_port=8080 \
--kubelet_https=true \
--secure_port=6443 \
--portal_net=10.100.0.0/16 \
--etcd_servers=http://127.0.0.1:4001 \
--public_address_override=172.17.8.101 \
--cloud_provider=__CLOUDPROVIDER__
@pires
pires / node.yaml
Last active August 29, 2015 14:13
#cloud-config
coreos:
units:
- name: etcd.service
mask: true
- name: fleet.service
command: start
content: |
[Unit]
#cloud-config
---
write_files:
- path: /opt/bin/waiter.sh
owner: root
content: |
#! /usr/bin/bash
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
coreos:
#!/bin/bash
# Nice reference: https://developers.google.com/compute/docs/images#buildingimage
# Would be even nicer if Google would use it in their own debian images.
echo "Running provisioner"
# Update APT cache, upgrade packages
apt-get update && apt-get -yq dist-upgrade
package utils;
import java.io.UnsupportedEncodingException;
import java.util.Enumeration;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
/**
* UTF-8 friendly ResourceBundle support
*
# Mongo DB options, configure these if you are using the "mongo" option for one of your stores
mongoDbHost=127.0.0.1
mongoDbPort=27018
mongoDbDatabase=db_test
@pires
pires / GenericObdCommand.java
Last active December 16, 2015 09:39
Generic ObdCommand that accepts a message in byte notation.
public class GenericObdCommand extends ObdCommand {
/**
* Default ctor.
*/
public GenericObdCommand(String bytes) {
super(bytes);
}
/**