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 | |
set -eou pipefail | |
jira issue list \ | |
-a$(jira me) \ | |
--plain \ | |
--columns id,summary,status | | |
fzf \ | |
--layout=reverse \ |
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 -S deno run --allow-all | |
// Relies on pd binary which is auto installed with npx https://github.com/martindstone/pagerduty-cli/blob/master/docs/incident.md#pd-incident-create | |
// for globals and happy editor | |
import "https://deno.land/x/[email protected]/globals.d.ts"; | |
// For shell like syntax without needing vl shebang | |
import "https://deno.land/x/[email protected]/globals.ts"; | |
import "https://deno.land/std/log/mod.ts" | |
import * as log from "https://deno.land/std/log/mod.ts"; | |
import { Checkbox } from "https://deno.land/x/[email protected]/prompt/checkbox.ts"; |
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 | |
# EBS disk warming script to run on boot to automatically warm restored snapshot | |
# disks once per volume id | |
# Place entry in crontab for root using `crontab -e` | |
# ### Note some paths are restrictive and require extra workarounds | |
# PATH=/sbin:/usr/local/bin:/bin | |
# @reboot bash -c "sleep 60 && ebs_warm_disk >> /var/log/fio.log 2>&1" | |
# Assumptions | |
# volume to warm is /data and xfs type |
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 | |
set -eou pipefail | |
set -x | |
CURRENT_DIR="$(pwd)" | |
WORKSPACE=$(mktemp -d) | |
trap "rm -rf $WORKSPACE" EXIT | |
( | |
cd "$WORKSPACE" |
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 | |
set -eou pipefail | |
main() { | |
local branch_name | |
branch_name="$(git rev-parse --abbrev-ref HEAD)" | |
local base_branch="${1:-master}" | |
\git push origin "$branch_name" | |
hub pull-request -b "$base_branch" |
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' | |
def get_links(file) | |
body = File.read(file) | |
json = JSON.parse(body) | |
kv = json.dig("store", "pluginStates").to_a | |
JSON.parse(kv.first[1])["requests"] | |
.map { |k,v| v["url"] } | |
.reject { |l| l[/clients3\.google\.com|doubleclick|localhost|googleapis\.com/] } | |
.sort |
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 | |
# Load no gems beyond stdlib due to native extensions breaking | |
# and rebuilding between different ruby versions and chruby/system. | |
# Also should speed up script timing. ZPH | |
$LOAD_PATH.delete_if { |l| l[/\/(gems|extensions)\//] } | |
######################################################### | |
## Generated Code: do not submit patches. | |
## Submit patches against non-generated version of code. | |
######################################################### |
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
defmodule RnaTranscription do | |
@doc """ | |
Transcribes a character list representing DNA nucleotides to RNA | |
## Examples | |
RnaTranscription.to_rna('ACTG') | |
'UGAC' | |
""" | |
@rna_map %{?A => 'U', ?T => 'A', ?G => 'C', ?C => 'G'} | |
def lookup(k) 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 bash | |
set -CEeuo pipefail | |
IFS=$'\n\t' | |
shopt -s extdebug | |
main() { | |
networksetup -getairportnetwork en0 | sed 's/Current Wi-Fi Network: //g' | |
} |
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 Archiver < Formula | |
desc "Easily create & extract archives, and compress & decompress files of various formats" | |
homepage "https://godoc.org/github.com/mholt/archiver" | |
url "https://github.com/mholt/archiver/releases/download/v3.2.0/arc_mac_amd64" | |
sha256 "1932ecb8b8dc8492e62a608f436dc6d514c8357e224fd5fe7653bd3266cd67e3" | |
def install | |
bin.install "arc_mac_amd64" => "arc" | |
end |
NewerOlder