Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View raizyr's full-sized avatar
Working from home

Chris McNabb raizyr

Working from home
  • Bethesda, MD
  • 03:28 (UTC -04:00)
View GitHub Profile
@raizyr
raizyr / wake-up-light-alarm-with-sunrise-effect.yaml
Created May 22, 2023 22:39 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
DELETE ME - Must create a new gist with an initial file
@raizyr
raizyr / create_single_node_k8s.sh
Last active January 25, 2019 20:55
Create a Single Node Kubernetes cluster on Ubuntu 18.04
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.6.10 --kubernetes-version=v1.13.0
mkdir -p $HOME/.kube
sudo cp /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
kubectl taint nodes --all node-role.kubernetes.io/master-
#!/bin/bash
domains=("echo360.org" "echo360.org.uk" "echo360.org.au")
pids=""
for domain in ${domains[@]}; do
ping -c6 -i10 $domain &
pids="$pids $!"
done
wait $pids
@raizyr
raizyr / keybase.md
Created August 21, 2016 20:44
Keybase proof

Keybase proof

I hereby claim:

  • I am raizyr on github.
  • I am raizyr (https://keybase.io/raizyr) on keybase.
  • I have a public key ASDPKeFTlj8ad3dZGyLxnjswC2QFkDHb8njpj5K5trO66Qo

To claim this, I am signing this object:

class Libgit2 < Formula
desc "C library of Git core methods that is re-entrant and linkable"
homepage "https://libgit2.github.com/"
url "https://github.com/libgit2/libgit2/archive/v0.24.0.tar.gz"
sha256 "1c6693f943bee3f634b9094376f93e7e03b9ca77354a33f4e903fdcb2ee8b2b0"
head "https://github.com/libgit2/libgit2.git"
bottle do
cellar :any
revision 1
Nov 1 07:16:26 lumberyard-3 unbound: [20904:0] info: reply from <.> 10.200.0.2#53
Nov 1 07:16:26 lumberyard-3 unbound: [20904:0] info: query response was ANSWER
Aug 30 06:17:01 lumberyard-3 CRON[12247]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Nov 1 07:17:01 lumberyard-3 CRON[12248]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Nov 1 07:17:26 lumberyard-3 unbound: [20904:0] info: resolving 5-3-2-app.agent.datadoghq.com. A IN
@raizyr
raizyr / gist:bb15a7ea639daa09350b
Last active August 29, 2015 14:22
Not one line, but possibly easier to read
require 'test/unit'
include Test::Unit::Assertions
instance_true = {:source_dest_check => true}
instance_nil = {:source_dest_check => nil}
instance_false = {:source_dest_check => false}
instance_raise = {}
instance_garbage = {:source_dest_check => 'asdfl;kjag'}
def test(instance)
cmcnabb@zim  ~/Code/Ndn/Ops/vominator2   raizyr  bundle exec rspec --color --format documentation --require spec_helper spec
/Users/cmcnabb/Code/Ndn/Ops/vominator2/lib/vominator/constants.rb:6:in `<top (required)>': undefined method `[]' for false:FalseClass (NoMethodError)
from /Users/cmcnabb/Code/Ndn/Ops/vominator2/lib/vominator/aws.rb:3:in `require_relative'
from /Users/cmcnabb/Code/Ndn/Ops/vominator2/lib/vominator/aws.rb:3:in `<top (required)>'
from /Users/cmcnabb/Code/Ndn/Ops/vominator2/spec/lib/vominator/aws_spec.rb:2:in `require'
from /Users/cmcnabb/Code/Ndn/Ops/vominator2/spec/lib/vominator/aws_spec.rb:2:in `<top (required)>'
from /usr/local/var/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
from /usr/local/var/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /usr/local/var/rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.3/lib/rsp
group :deployers do
members node['app_base']['deployers']
end
directory "/deployment" do
group :deployers
end
cookbook_file "/deployment/ssh_key.pem" do
source "deploy_key"