I hereby claim:
- I am jorgenpt on github.
- I am jorgenpt (https://keybase.io/jorgenpt) on keybase.
- I have a public key whose fingerprint is C54B EFD5 C4CF 4AEE D568 9A3C CEE2 5916 07D6 4BF0
To claim this, I am signing this object:
| // To be run on https://store.steampowered.com/account/history/ | |
| function parseTotals() | |
| { | |
| var transactions = document.getElementsByClassName('wallet_table_row'); | |
| var totals = { usd: 0, eur: 0 }; | |
| for (var i = 0; i < transactions.length; ++i) | |
| { | |
| var transaction = transactions[i]; | |
| var items = transaction.getElementsByClassName('wht_items')[0]; | |
| if (items && items.innerText.indexOf('Wallet Credit') >= 0) |
| using System; | |
| using System.Collections.Generic; | |
| namespace JPT | |
| { | |
| public class TextProgressBar : IDisposable | |
| { | |
| private int _progress; | |
| private int _total; | |
| private int _width; |
| #!/bin/bash -e | |
| # Helper script for extracting the steam-runtime that: | |
| # - Strips unused parts of the runtime (documentation) | |
| # - Allows you to extract a single architecture | |
| # - Extracts it to a directory that doesn't contain the runtime date. | |
| function fatal() { echo "$@" >&2; exit 1; } | |
| if [ $# -lt 3 ]; then | |
| fatal "Usage: $0 <steam-runtime path> <amd64|i386|all> <output directory>" >&2 |
| #!/bin/bash | |
| # Path relative to the directory where the executable lives. | |
| JPT_STEAM_RUNTIME_LOCATION='steam-runtime' | |
| # Figure out where this script lives. | |
| exedir="$(cd "$(dirname "$0")" && pwd)" | |
| # If this script is named `foo.sh' or `foo', we execute `foo.bin' | |
| exename="$(basename "$0" ".sh").bin" |
| #pragma once | |
| #define _CheckTypes(a,b) _Static_assert(_Generic(a, typeof (b):1, default: 0), "Mismatched types") | |
| #define Min(a,b) \ | |
| ({ \ | |
| const typeof (a) _a = (a); \ | |
| const typeof (b) _b = (b); \ | |
| _CheckTypes(_a,_b); \ | |
| (_a < _b ? _a : _b); \ |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Number of seconds we wait after a file is received before we consider the | |
| # batch to be completed. | |
| TIMEOUT=2 | |
| # Title of the tab in Kaleidoscope | |
| LABEL="P4V ksdiff-batch" | |
| # FIFO we communicate with the "batch master" for. | |
| fifo="/tmp/ksdiff-batch-$USER" |
| #!/bin/bash | |
| DIR=$(cd "$(dirname "$0")"; pwd) | |
| MONO=`which mono` | |
| if [ ! -z "$MONO" ]; then | |
| TXT=`${MONO} -V` | |
| VERSION="${TXT#"${TXT%%[[:digit:]]*}"}" | |
| VERSION="${VERSION%%[^[:digit:].]*}" | |
| VERSION="${VERSION//[!0-9\.]/}" | |
| fi |
| #import <Foundation/Foundation.h> | |
| @protocol HTTPSCertificateRetrieverDelegate <NSObject> | |
| /** | |
| * Called when we succeed (or fail) to retrieve the certificate. | |
| * | |
| * @param certificate nil if we fail, otherwise the data of the certificate. | |
| */ | |
| - (void)certificateRetrieved:(NSData*)certificate; |
| defaults write com.apple.finder NSUserKeyEquivalents -dict-add "Add to Sidebar" nil |