Skip to content

Instantly share code, notes, and snippets.

Dan Ryan danryan

Block or report user

Report or block danryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@detiber
detiber / README.md
Last active Oct 26, 2019
Using CFSSL as an external CA for kubeadm
View README.md

CFSSL as an external CA for non-ha kubeadm intialized clusters

Using cfssl to Create an External CA Infrastructure

Install cfssl

# This requires an existing Go environment with GOPATH set
go get -u github.com/cloudflare/cfssl/cmd/...
@tam7t
tam7t / vault-statsd-mapping.conf
Last active Aug 1, 2018
Example vault statsd prometheus exporter mapping
View vault-statsd-mapping.conf
vault.barrier.*
name="vault_barrier"
method="$1"
vault.consul.*
name="vault_consul"
method="$1"
vault.route.*.*
name="vault_route"
@alexellis
alexellis / pwd-faas.md
Last active Jan 19, 2017
pwd-faas-quickstart.md
View pwd-faas.md

FaaS - functions as a Service Quick Start / Test Drive

This page has moved into the repository!

Head over the to Github repository for the TestDrive document

@so0k
so0k / kubectl.md
Last active Nov 7, 2019
Playing with kubectl output
View kubectl.md

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@pgporada
pgporada / centos7_kernel_update.md
Last active Jul 25, 2019
Upgrade Kernel on Centos7 via ELRepo
View centos7_kernel_update.md
Install the ELRepo and GPG key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install -y http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Enable kernel updates from elrepo
yum-config-manager --enable elrepo-kernel
@lyrixx
lyrixx / segfault-finder.php
Last active Sep 23, 2019
How to find a segfault in PHP
View segfault-finder.php
<?php
register_tick_function(function() {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
$last = reset($bt);
$info = sprintf("%s +%d\n", $last['file'], $last['line']);
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND);
// or
// file_put_contents('php://output', $info, FILE_APPEND);
});
@allanmac
allanmac / sha256.cu
Last active Oct 10, 2019
A CUDA SHA-256 subroutine using macro expansion
View sha256.cu
// -*- compile-command: "nvcc -m 32 -arch sm_35 -Xptxas=-v,-abi=no -cubin sha256.cu"; -*-
//
// Copyright 2013 Allan MacKinnon <allanmac@alum.mit.edu>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
@trobrock
trobrock / notify.rb
Created Jun 20, 2013
weechat ruby notifications, thanks @joelteon
View notify.rb
require 'ruby_gntp'
Weechat.register "notify", "otters", "0.2", "GPL", "notify: A real time notification system for weechat", "", ""
Settings = {
:show_hilights => "on",
:show_priv_msg => "on"
}
def notify_show data, buffer, empty, tagsn, isdisp, ishilight, prefix, msg
@andrewkatz
andrewkatz / .zshrc
Created May 6, 2013
Simple command for ssh'ing into rails hosts. Thanks to @trobrock for the ruby script.
View .zshrc
# Usage:
# rails_ssh release cron
# => ssh release@ec2-xx-xx-xx-xx.compute-1.amazonaws.com
rails_ssh()
{
username=$1
hostname="$(ruby $HOME/Scripts/parse_cap_config.rb $2)"
ssh $username@$hostname
}
@andreas
andreas / gist:5432990
Created Apr 22, 2013
Use [rblineprof](https://github.com/tmm1/rblineprof) for profiling Rails apps
View gist:5432990
class RBLineProfiler
WALL_TIME_LIMIT = 10e3 # ms
def initialize(app)
@app = app
end
def call(env)
result = nil
profile = lineprof(/./) { result = @app.call(env) }
You can’t perform that action at this time.