Skip to content

Instantly share code, notes, and snippets.

View raykrueger's full-sized avatar

Ray Krueger raykrueger

  • Chicago, IL, USA
View GitHub Profile
@raykrueger
raykrueger / install-eks-anywhere-tools.sh
Last active May 23, 2023 21:02
This script installs eksctl, eksctl-anywhere, kubectl, and docker-ce on Ubuntu. Download it and run it ./install-eks-anywhere-tools.sh
#!/usr/bin/env bash
EKSA_RELEASE="0.13.1"
RELEASE_NUMBER=26
OS="$(uname -s | tr A-Z a-z)"
ARCH=$(test "$(uname -m)" = 'x86_64' && echo 'amd64' || echo 'arm64')
sudo echo 'Let us begin'
echo Installing eksctl
bucket=$(uuidgen)
aws s3 mb s3://${bucket}
cat > lifecycle.json <<EOF
{
"Rules": [
{
"Filter": {
"Prefix": ""
},
@raykrueger
raykrueger / keybase.md
Created March 17, 2014 21:10
keybase.md

Keybase proof

I hereby claim:

  • I am raykrueger on github.
  • I am raykrueger (https://keybase.io/raykrueger) on keybase.
  • I have a public key whose fingerprint is 7C86 BAF2 981F 02F6 7829 9BDB 7A02 9E2E 993D 6367

To claim this, I am signing this object:

@raykrueger
raykrueger / Gemfile
Created March 20, 2013 14:35
A stupid script for watching the lollapalooza ticket page :)
source "https://rubygems.org"
gem "timers"
gem "nokogiri"
@raykrueger
raykrueger / gist:1592087
Created January 11, 2012 00:10 — forked from waustin/gist:1591097
SIGNAL HQ API List Creationg Sample
import requests
from pprint import pprint
input_data = """<?xml version="1.0" encoding="UTF-8"?><subscription>
<subscription-type>EMAIL</subscription-type>
<source-keyword>CRAZY_COFFEE</source-keyword>
<user>
<email-address>user1@example.com</email-address>
<first-name>Test</first-name>
require 'logger'
require 'openssl'
class UcellGateway
#dunno what this is, but it's yours :)
include MessageFilter
def initialize
@logger = Logger.new
@raykrueger
raykrueger / geolocation.js
Created October 5, 2011 15:01
Geolocation example
$(document).ready(function() {
if (!!navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude
var lng = position.coords.longitude
$.get('/locate' + '?lat=' + lat + '&lng=' + lng, function(data){
$('#locations').html(data);
$('.stripey li:even').addClass('alt');
});
{ "_id" : ObjectId("4e15e72a4d56412e7f00bd17"),
"address" : "4647 Buttermilk Hollow Rd, West Mifflin, PA 15122-1101",
"loc" : [ 40.361421, -79.907644 ],
"owner_key" : "c79b0170896e012e7f2b00264a18267e",
"created_at" : ISODate("2011-07-07T17:04:42Z"),
"title" : "redbox at Foodland",
"updated_at" : ISODate("2011-07-13T17:54:04Z"),
"reference_id" : "31382"
}
if (!!navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
$.get('/locate?lat=' + lat + '&lng=' + lng, function(data){
$('#locations').html(data);
});
},
function(e) {
@raykrueger
raykrueger / passgen
Created May 5, 2011 15:59
Generating secure repeatable passwords with OpenSSL
#!/bin/bash
# see http://www.openssl.org/docs/apps/passwd.html
DOMAIN=$1
PEPPER=55e730a3
SALT=`echo ${PEPPER}${DOMAIN} | shasum | cut -c 1-8`
openssl passwd -1 -salt $SALT | cut -d '$' -f 4