Skip to content

Instantly share code, notes, and snippets.

@marknotfound
marknotfound / gist:84da817443e54b54b27543b0dc8a1609
Created July 29, 2023 23:19
Workout list generator for defy calendar hack
import csv
import yaml
"""
convert yaml to json
python -c "import sys, yaml, json; json.dump(yaml.load(sys.stdin, Loader=yaml.FullLoader), sys.stdout, indent=4)" < public/plans/yaml/higdon_int_half2.yaml > public/plans/json/higdon_int_half2.json
"""
"""
Grab a CSV from the higdon site by exporting the html table, then use this script to parse
@marknotfound
marknotfound / wordle-answers-alphabetical.txt
Created February 10, 2022 14:34 — forked from cfreshman/wordle-answers-alphabetical.txt
Wordle answers from source code in alphabetical order. And if you write a solver, here's a leaderboard! https://freshman.dev/wordle/#/leaderboard
aback
abase
abate
abbey
abbot
abhor
abide
abled
abode
abort
@marknotfound
marknotfound / PHP Synthesize
Created April 16, 2014 17:41
Generate setter and getter methods for a PHP member variable.
<snippet>
<content><![CDATA[
/**
* @return ${1:type}
*/
${2:visibility} function get${3:Name}() {
return \$this->${5:property};
} // get${3:Name}
@marknotfound
marknotfound / Remove Gmail Image Proxy
Created February 5, 2014 20:16
A bookmarklet to remove Gmail's image proxy links so you can load locally hosted images in your Gmail inbox during email tests.
javascript:(function(){var e=new RegExp("^https://[a-zA-Z0-9]+.googleusercontent.com/proxy/[a-zA-Z0-9_-]+[=][a-zA-Z0-9-+]+#");var t=document.getElementsByTagName("img");for(var n=0;n<t.length;n++){t[n].src=t[n].src.replace(e,"")}})()
@marknotfound
marknotfound / hijack-fix.js
Last active December 31, 2015 17:59
Sailthru Image Hijack Fix (Bookmarklet)
javascript:(function(){
$('iframe[name=preview]').contents().find('img').each(function(key, ele) {
var $self = $(ele),
src = $self.attr('src'),
prefix = 'https://my.sailthru.com/ssl?url=',
unhijacked;
unhijacked = decodeURIComponent(src.replace(prefix, ''));
$self.attr('src', unhijacked);
@marknotfound
marknotfound / PHP US States
Last active December 14, 2015 10:49
A PHP associative array filled with US states using abbreviations as keys.
<?php
$state_list = [
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
@marknotfound
marknotfound / PHP Countries
Last active December 14, 2015 10:49
A PHP associative array filled to the brim with different countries using their abbreviations as keys.
<?php
$countries = [
'AD' => 'Andorra',
'AE' => 'United Arab Emirates',
'AF' => 'Afghanistan',
'AG' => 'Antigua and Barbuda',
'AI' => 'Anguilla',
'AL' => 'Albania',
'AM' => 'Armenia',