Skip to content

Instantly share code, notes, and snippets.

View BugRoger's full-sized avatar
😎
Dealing with it

Michael Schmidt BugRoger

😎
Dealing with it
  • SAP SE
  • Berlin
View GitHub Profile
@BugRoger
BugRoger / http_client.rb
Created December 4, 2014 09:58
HTTPClient
class HTTPClient
VERB_MAP = {
get: Net::HTTP::Get,
post: Net::HTTP::Post,
put: Net::HTTP::Put,
delete: Net::HTTP::Delete
}
def initialize(endpoint, options = {})
uri = URI.parse(endpoint)
@BugRoger
BugRoger / highmaul.md
Last active August 29, 2015 14:10
Phalanx Highmaul Tactics

Highmaul

Kargath Bladefist is a fairly straightforward fight that requires moderate coordination. Throughout the encounter, Kargath will use the Chain Hurl ability to pick up the five nearest players and fling them into the stands of the Coliseum where they can engage the enemies in the audience. The most dangerous mechanic in the encounter is Berserker Rush. It can only be stopped by the target's death or by kiting Kargath through an active Flame Pillar

Recap

  • 2 tanks, 3 healers
  • Spread out 7y for Blade Dance
  • Move the fuck out of his way for Berserker Rush
  • Pull into the flaming pillars
  • Chain Hurl will throw closest 5 on the stands. Kill stuff. Alertnate tanks with debuff.
@BugRoger
BugRoger / gist:67fe14e34f08f7b39ee6
Last active August 29, 2015 14:15
EdgeRouter Reinstall
EMRK>emrk-reinstall
WARNING: This script will reinstall EdgeOS from scratch
If you have any usable data on your router storage,
it will be irrecoverably destroyed!
Do you want to continue?
yes or no: yes
Unmounting boot partition
Unmounting root partition
Re-creating partition table
Creating boot partition
#cloud-config
users:
- name: core
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvFapuevZeHFpFn438XMjvEQYd0wt7+tzUdAkMiSd007Tx1h79Xm9ZziDDUe4W6meinVOq93MAS/ER27hoVWGo2H/vn/Cz5M8xr2j5rQODnrF3RmfrJTbZAWaDN0JTq2lFjmCHhZJNhr+VQP1uw4z2ofMBP6MLybnLmm9ukzxFYZqCCyfEEUTCMA9SWywtTpGQp8VLM4INCxzBSCuyt3SO6PBvJSo4HoKg/sLvmRwpCVZth48PI0EUbJ72wp88Cw3bv8CLce2TOkLMwkE6NRN55w2aOyqP1G3vixHa6YcVaLlkQhJoJsBwE3rX5603y2KjOhMomqHfXxXn/3GKTWlsQ== michael.j.schmidt@gmail.com
- name: michi
groups:
- sudo
- docker
@BugRoger
BugRoger / gist:af71c9531e17bbc7f147
Created February 27, 2015 07:54
Ceph Mon Orchestration
#!/bin/bash
if [ ! -n "$MON_NAME" ]; then
echo "ERROR- MON_NAME must be defined as the name of the monitor"
exit 1
fi
if [ ! -n "$MON_IP" ]; then
echo "ERROR- MON_IP must be defined as the IP address of the monitor"
exit 1
@BugRoger
BugRoger / ceph-osd.service
Created March 1, 2015 11:07
ceph-osd.service
[Unit]
Description=Ceph OSD
After=docker.service
After=ceph-mon.service
RequiresMountsFor=/var/lib/ceph/osd
[Service]
EnvironmentFile=/etc/environment
Environment=HOSTNAME=%H
ExecStartPre=/usr/bin/docker run --rm -v /opt/bin:/opt/bin ibuildthecloud/systemd-docker

Keybase proof

I hereby claim:

  • I am bugroger on github.
  • I am michaelschmidt (https://keybase.io/michaelschmidt) on keybase.
  • I have a public key whose fingerprint is 7709 9F40 A0BB 8E4F CAD8 DA24 F46C A408 9726 1F33

To claim this, I am signing this object:

@BugRoger
BugRoger / curl-ttfb.sh
Created March 24, 2015 14:31
curl-ttfb.sh
#!/bin/bash
while true; do
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \
-w "%{time_total}\t%{time_starttransfer}\t%{time_pretransfer}\t%{time_connect}\n" \
"$1?`date +%s`"
done
@BugRoger
BugRoger / batman.service
Created March 27, 2015 12:02
systemd Sidekick
[Unit]
Requires=robin.service
Before=robin.service
[Service]
ExecStart=/bin/bash -c '\
echo "batman start"; \
while true; do \
echo "batman alive"; \
sleep 1; \
jobs:
- name: dashboard-build
serial: true
plan:
- get: dashboard.git
- do:
- task: a
privileged: true
config:
platform: linux