https://keyoxide.org/7AFFA019A34DB4CCE268699A6FE73398DD61DFCB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# description: | |
# Symlink a short name to an exact version | |
# | |
# usage: | |
# asdf-alias <plugin> <name> [<version> | --auto | --remove]" | |
# asdf-alias <plugin> --auto" | |
# asdf-alias <plugin> [--list]" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# prereqs: awscli, awslocal (for now), jq | |
set -e | |
streamname=$1 | |
iteratorType=${2:-LATEST} | |
shard=$(awslocal kinesis describe-stream --stream-name $streamname --query 'StreamDescription.Shards[0].ShardId' --output text) | |
iterator=$(awslocal kinesis get-shard-iterator --stream-name $streamname --shard-id $shard --shard-iterator-type $iteratorType --output text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
users = JSON.parse(`aws iam list-users`)['Users'].map { |u| u['Arn'] } | |
groups = JSON.parse(`aws iam list-groups`)['Groups'].map { |u| u['Arn'] } | |
roles = JSON.parse(`aws iam list-roles`)['Roles'].map { |u| u['Arn'] } | |
all = users + groups + roles | |
actions = ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local numbers_list = redis.call('ZRANGE', KEYS[1], 0, -1, 'WITHSCORES') | |
local numbers = {} | |
--every other value is a key | |
for idx = 1, #numbers_list, 2 do | |
numbers[numbers_list[idx]] = numbers_list[idx + 1] | |
end | |
--add missing numbers at '0' and immediately return first one | |
for _, f in pairs(ARGV) do | |
if numbers[f] == nil then | |
redis.call('ZADD', KEYS[1], 1, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am onyxraven on github. | |
* I am onyxraven (https://keybase.io/onyxraven) on keybase. | |
* I have a public key whose fingerprint is 7AFF A019 A34D B4CC E268 699A 6FE7 3398 DD61 DFCB | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import argparse | |
try: | |
from boto.ec2.connection import EC2Connection | |
except ImportError: | |
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n') | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RequestCacheStore < ActiveSupport::Cache::Store | |
# Delete all entries with keys matching the pattern. | |
# | |
# Options are passed to the underlying cache implementation. | |
# | |
# All implementations may not support this method. | |
def delete_matched(matcher, options = nil) | |
options = merged_options(options) | |
instrument(:delete_matched, matcher.inspect) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#requires osx fsevent | |
#requires growl with network registration enabled (at least once) | |
#requires the below rubygems | |
#requires rsync | |
require 'rubygems' | |
require 'rb-fsevent' | |
require 'ruby-growl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#requires gnu getopt | |
#requires rsync | |
GETOPT="/opt/local/bin/getopt" | |
rsynccmd="rtlzv --exclude=compile --exclude=cache" | |
localdir='/Volumes/Work/dev' | |
devdir='/home/username/dev' | |
devhost="dev" |
NewerOlder