Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dictvm on github.
  • I am dictvm (https://keybase.io/dictvm) on keybase.
  • I have a public key whose fingerprint is 8C59 5604 DE53 942D 32C9 F677 03C6 8DEE B251 006E

To claim this, I am signing this object:

- name: copy updated files to ghost directory
synchronize: src={{ item.src }} dest={{ item.dest }} checksum=yes times=no
with_fileglob:
- { src: '{{ ghost_dir_new }}/*.js', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/*.json', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/*.md', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/core', dest: '{{ ghost_dir_current }}' }
- { src: '"{{ ghost_dir_new }}/{{ theme_dir }}"', dest: '"{{ ghost_dir_current }}/{{ theme_dir }}"' }
delegate_to: "{{ inventory_hostname }}"
@dictvm
dictvm / nonchoppybluetooth
Created August 18, 2016 16:38
Okayish Bluetooth configuration for OS X El Capitan to work with Bose Soundlink Mini 2
{
"Apple Bitpool Max (editable)" = 80;
"Apple Bitpool Min (editable)" = 35;
"Apple Initial Bitpool (editable)" = 35;
"Apple Initial Bitpool Min (editable)" = 53;
"Negotiated Bitpool" = 80;
"Negotiated Bitpool Max" = 80;
"Negotiated Bitpool Min" = 80;
}
@dictvm
dictvm / ruby_k8s_democode.py
Created March 20, 2017 16:02
Example ruby code to create a secret in a Kubernetes cluster which throws an excemption
#!/usr/bin/env ruby
require 'kubeclient'
@metadata = {"name"=>{"stage"=>"prod", "app"=>"appname"}}
@secret = {"data"=>{"password"=>"Y29tcGxleF9wYXNzd29yZF9wcm9kdWN0aW9u", "user"=>"ZmNhc3Q="}}
def main()
client = kube_config()
push_secret(client)
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = 44704c6
version = 0.9.1
consul:
agent:
check_monitors = 0
check_ttls = 1
checks = 1
services = 1
build:
prerelease =
revision = 44704c6
version = 0.9.1
consul:
/usr/local/bin/consul agent -server -data-dir data -retry-join 'provider=aws tag_key=foo tag_value=bar' -bind 127.0.0.1
==> Starting Consul agent...
==> Consul agent running!
Version: 'v0.9.1'
Node ID: '6c5ffc4d-268a-f96c-dae2-b0bfc39f5e5c'
Node name: 'ip-172-21-70-31'
Datacenter: 'dc1'
Server: true (bootstrap: false)
Client Addr: 127.0.0.1 (HTTP: 8500, HTTPS: -1, DNS: 8600)
Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
-- Logs begin at Thu 2017-08-10 15:19:48 UTC, end at Thu 2017-08-10 15:26:26 UTC. --
Aug 10 15:19:58 ip-172-21-70-170 systemd[1]: Starting Consul service discovery agent...
-- Subject: Unit consul.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit consul.service has begun starting up.
Aug 10 15:19:58 ip-172-21-70-170 systemd[1]: Started Consul service discovery agent.
-- Subject: Unit consul.service has finished start-up
-- Defined-By: systemd
[Unit]
Description=Consul service discovery agent
Requires=network-online.target
After=network.target
[Service]
User=consul
Group=consul
Restart=on-failure
Environment=GOMAXPROCS=2