Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 'base64' | |
require 'json' | |
require 'openssl' | |
if ARGV.include?('-h') || ARGV.include?('--help') | |
puts <<~EOS | |
USAGE |
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
#include <stdio.h> | |
#include <stdint.h> | |
typedef struct { | |
uint8_t foo :4; | |
uint8_t :3; | |
uint8_t bar :1; | |
} foobar; | |
int main(int argc, char** 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
#!/bin/bash | |
set -e | |
APIKEY="YOUR-API-KEY-HERE" | |
trap onexit INT | |
function reset() { | |
echo 'Resetting status' | |
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token=${APIKEY}&profile=%7B%22status_text%22%3A%22%22%2C%22status_emoji%22%3A%22%22%7D" > /dev/null |
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/local/bin/bash | |
set -e | |
if [ -z "$1" ]; then | |
echo "Must provide database name, e.g. 'my_database'" | |
exit 1 | |
fi | |
db_dir=$(psql postgres -Atc "select (select setting from pg_settings where name = 'data_directory') || '/base/' || (select oid from pg_database where datname='$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
{-# LANGUAGE MultiParamTypeClasses, MonoLocalBinds #-} | |
import Control.Monad.Reader | |
class HasFoo where | |
foo :: App String | |
class HasBar where | |
bar :: String |
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 | |
set -Eeuo pipefail | |
# Create a tempfile, get writeable (4) and readable (5) file descriptors. | |
# Immediately remove the actual temfile, making it inaccessible to other | |
# processes. This script will hold onto the descriptors until it exits. | |
tmpfile=$(mktemp) | |
echo "created $tmpfile" | |
exec 5<"$tmpfile" 4>"$tmpfile" |
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
None | |
createInforceReissue -> Open | |
Open& | |
cancel -> None | |
NBX | |
Valid | |
add change -> CheckingWithFlashUW | |
finalize -> REFLEXSubmitted | |
Invalid |
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
Batch Open | |
1 closeout -> 2 Cash Drop In-Progress | |
2 Cash Drop In-Progress | |
next -> 3 Printing All-Debts Receipt | |
3 Printing All-Debts Receipt | |
next -> 3 Printing Total-Tendered Receipt | |
3 Printing Total-Tendered Receipt | |
print error -> Error | |
4 next -> 5 Check Listing Screen | |
5 Check Listing Screen |
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
Order | |
Open | |
addItem -> AddingItem? | |
# Transient | |
AddingItem? | |
added -> Hold | |
Hold | |
addItem -> AddingItem? | |
reopen -> Open | |
tender -> ZeroBalance? |