Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
lyoshenka / 3-4 stats
Last active December 18, 2015 17:19
AMP stats - throwing to women - 3/4 ratio
-----------------------------------------------------------
| thrower | 3/4 Throws | 3/4 F | 3/4 F Exp | 3/4 Diff |
|---------------------------------------------------------|
| Grin (m) | 18 | 0.667 | 0.667 | +0.000 |
| Devlin (f) | 113 | 0.442 | 0.500 | -0.058 |
| Dre (f) | 41 | 0.439 | 0.500 | -0.061 |
| Nico (m) | 15 | 0.600 | 0.667 | -0.067 |
| Krista (f) | 21 | 0.429 | 0.500 | -0.071 |
| Miggs (m) | 312 | 0.583 | 0.667 | -0.083 |
| Jessie (f) | 12 | 0.417 | 0.500 | -0.083 |
@lyoshenka
lyoshenka / 4-3 stats
Created June 19, 2013 21:25
AMP stats - throwing to women - 4/3 ratio
------------------------------------------------------------
| thrower | 4/3 Throws | 4/3 F | 4/3 F Exp | 4/3 Diff |
|----------------------------------------------------------|
| Lexa (f) | 11 | 0.545 | 0.333 | +0.212 |
| Dre (f) | 125 | 0.416 | 0.333 | +0.083 |
| H (m) | 23 | 0.565 | 0.500 | +0.065 |
| Garret (m) | 11 | 0.545 | 0.500 | +0.045 |
| Jessie (f) | 67 | 0.358 | 0.333 | +0.025 |
| Weeks (f) | 9 | 0.333 | 0.333 | +0.000 |
| Devlin (f) | 83 | 0.313 | 0.333 | -0.020 |
@lyoshenka
lyoshenka / export_reader_history.sh
Last active December 19, 2015 00:18
Downloads the entire history of all of your feeds on Google Reader. Data is formatted in JSON, just the way Google Reader uses it. The data for each feed is placed in its own file.
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/your/subscriptions.xml"
exit 1
fi
grep -o 'xmlUrl="[^"]\+' "$1" | cut -d'"' -f2 | while read FEED; do
FEED_URL="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$FEED")"
URL="https://www.google.com/reader/api/0/stream/contents/feed/${FEED_URL}?r=n&n=99999"
/**
* jQuery.browser.mobile (http://detectmobilebrowser.com/)
*
* jQuery.browser.mobile will be true if the browser is a mobile device
*
**/
(function(a){jQuery.browser.mobile=/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})();
@lyoshenka
lyoshenka / ddns.sh
Last active October 11, 2023 04:28 — forked from kevinoconnor7/c-ddns.sh
Quick and dirty DDNS using Bash and Cloudflare (API v4 compatible)
#!/usr/bin/env bash
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://dash.cloudflare.com/profile/api-tokens
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit
# If you want to set the root domain instead of a subdomain, set SUBDOMAIN to "@"
# Step 2: Create an A record on Cloudflare with the subdomain you chose
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created.
# Fill in ZONE_ID and REC_ID below
# This step is optional, but will save you 2 requests every time you run this script
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating.
###[ Current settings for pagekite.py v0.5.3a. ]#########
#
## NOTE: This file may be rewritten/reordered by pagekite.py.
#
##[ Default kite and account details ]##
kitename = lyoshenka@gmail.com
kitesecret = ce2dfe2df39zbc26bfxcbc4kcfdkkkzc
##[ Front-end settings: use pagekite.net defaults ]##
#!/usr/bin/env php
<?php
$username = 'lyoshenka';
$stars = file_get_contents('https://api.github.com/users/' . $username . '/starred?per_page=100');
$stars = json_decode($stars, true);
//var_export($stars);
$languages = array();
foreach($stars as $star)
@lyoshenka
lyoshenka / ssh_tunnel.sh
Created September 12, 2013 14:04
Tunnel HTTP(s) over SSH
#!/bin/bash
# -f = daemonize, -q = quiet, -N = no command, just tunnel, -L = what port to forward, -i = ssh key
# sudo is only necessary when tunneling privileged ports
sudo ssh -f -N -q -L 80:localhost:80 user@host -i ~/.ssh/id_rsa
@lyoshenka
lyoshenka / pinboard-rename-tag.php
Created September 15, 2013 00:57
Merge two Pinboard tags into one, or rename a tag.
#!/usr/bin/env php
<?php
if (!isset($argv[2]))
{
echo "${argv[0]} FROM TO\n";
exit(1);
}
include 'pinboard-api.php'; // https://github.com/kijin/pinboard-api