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/sh | |
set -eux | |
PROFILE="default" | |
RESP="$(aws --profile ${PROFILE} --region "us-east-1" health describe-events --query 'events[?eventTypeCategory==`scheduledChange` && statusCode == `upcoming`]')" | |
LENGTH="$(echo ${RESP} | jq 'length')" | |
for i in $(seq 0 $(($LENGTH-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
#!/bin/bash | |
usage() { | |
echo "Usage: $0 [-m METRIC_NAME] [-u USER] [-p PASSWORD] [-d DATABASE] [-h]" | |
} | |
METRIC_NAME=theschwartz.count | |
DBUSER=root | |
DBPASS= | |
DATABASE=theschwartz |
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
https://github.com/tatsuru/targs |
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
... | |
write(2, "test\n", 5test | |
) = 5 | |
exit_group(0) = ? | |
+++ exited with 0 +++ |
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
tatsuru@moryo$ strace ./nothing /tmp | |
execve("./nothing", ["./nothing"], [/* 53 vars */]) = 0 | |
arch_prctl(ARCH_SET_FS, 0x4b4868) = 0 | |
sched_getaffinity(0, 8192, [f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]) = 64 | |
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000 | |
munmap(0xc000000000, 65536) = 0 | |
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a20c3f000 | |
mmap(0xc820000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc820000000 | |
mmap(0xc81fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc81fff8000 | |
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000 |
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 | |
require 'json' | |
def parse(uri) | |
JSON.parse `curl -s #{uri}`.gsub("/*\n * This file is intended for use only on aws.amazon.com. We do not guarantee its availability or accuracy.\n *\n * Copyright 2014 Amazon.com, Inc. or its affiliates. All rights reserved.\n */\ncallback({",'{').gsub("\);", '').gsub(/([a-zA-Z]+):/, '"\1":') | |
end | |
puts %w( | |
region |
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
tatsuru@moryo$ for char in {a..z}; do; which -a $char; done ~ | |
a not found | |
b not found | |
c not found | |
d not found | |
e not found | |
f not found | |
g not found | |
h not found | |
i not found |
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
set -g status-right "#W [#(cat /sys/class/power_supply/BAT0/status | cut -c-1)#(cat /sys/class/power_supply/BAT0/capacity)][#(cat /sys/class/power_supply/BAT1/status | cut -c-1)#(cat /sys/class/power_supply/BAT1/capacity)] %Y/%m/%d %H:%M" |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func sqrt_newton(x float64) float64 { | |
z, prev := 1.0, 3.0 | |
const threshold = 1e-15 |
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
var c = function(){ $('div#bigCookie').click(); }; | |
setInterval(c, 1); | |
var g = function(){$('div#goldenCookie').click();}; | |
setInterval(g, 5000); | |
var u0 = function(){$('div#upgrade0').click();}; | |
setInterval(u0, 1000); | |
var calculator = function() { |
NewerOlder