Skip to content

Instantly share code, notes, and snippets.

@NonlinearFruit
NonlinearFruit / kruptos.sh
Last active July 22, 2016 22:28
Kruptos is an minimalist password manager
function kruptos
{
if [[ $# -eq 1 ]]; then
DOWHAT="$1"
else
DOWHAT="d"
fi
FOLDER="~/.kruptos"
FROYO="/.phrazein"
if [[ $DOWHAT == "d" ]]; then
@NonlinearFruit
NonlinearFruit / PhotoSorter.py
Last active December 26, 2016 14:50
Sorts photos into a directory hierarchy according to their timestamp.
# The script is for taking a ton
# of photos and placing them into
# a structure like:
#
# - 2016
# - 01 January '16
# - 02 February '16
# - 03 March '16
# - ...
# - 2015
@NonlinearFruit
NonlinearFruit / TuringMachine_Addition.tm
Created September 28, 2018 15:05
Turing Machine for adding two binary numbers. http://morphett.info/turing/turing.html
startIncrement _ * l find0
startIncrement * * r startIncrement
find0 1 0 l increment
find0 0 1 l endIncrement
find0 * * l find0
increment 1 0 l increment
increment * 1 * endIncrement
var purchaseSleep = 500;
var cookieClickSleep = 5;
var goldCookieClickSleep = 200;
var sugarLumpClickSleep = 24*60*60*1000;
var maxUpgradeWait = 10*60;
var priorityUpgrades = [476];
var excludeUpgrades = ["toggle","tech"];
function buyBestThing(){
var myCookies = Game.cookies;
@NonlinearFruit
NonlinearFruit / MyAom100Books.md
Last active April 5, 2019 03:20
The union of "100 Books Every Man Should Read" and "100 Must Read Books: The Man's Essential Library" by Art of Manliness

100 Must Read Books

Title Author Rating
1984 George Orwell
7 Habits of Highly Successful People, The Stephen Covey
Adventures of Huckleberry Finn, The Mark Twain
After Virtue Alasdair MacIntyre
All Quiet on the Western Front Erich Maria Remarque
American Boys’ Handy Book Daniel Carter Beard
Animal Farm George Orwell 8
@NonlinearFruit
NonlinearFruit / Book_GoodReads.js
Last active July 21, 2019 02:28
Retrospector Book Plugin
// https://www.goodreads.com/book/title.xml?author=Arthur+Conan+Doyle&key=zj1nZyl5vy2F4vGRt2Elg&title=Hound+of+the+Baskervilles
/**
This plugin is only meant to handle the 'Book' category.
It is not meant to for anything else. Assumptions:
- 'Year' factoid exists
- The title is either in the title or episode field
- Book episodes are of the form 'B1 Scarlet Thread, The'
- If there is a comma in the title, it is only followed by 'A', 'An' or 'The'
**/
@NonlinearFruit
NonlinearFruit / Movie_Imdb.js
Last active July 21, 2019 02:33
Retrospector Movie Plugin
/**
This plugin is only meant to handle the 'Movie' category.
It is not meant to for anything else. Assumptions:
- 'Year' factoid exists
- Movie episodes are of the form 'M1 Age of Ultron', 'P6 Return of the Jedi' etc
- Movies with season+episode contain the movie title in the season field 'M3 Return of the King'
- If there is a comma in the title, it is only followed by 'a', 'an' or 'the'
**/
// 'Import' the necessary classes
@NonlinearFruit
NonlinearFruit / TvSeries_Imbd.js
Last active July 21, 2019 02:34
Retrospector Tv Series Plugin
/**
This plugin is only meant to handle the 'TV Series' category.
It is not meant to for anything else. Assumptions:
- 'Year' factoid exists
- Seasons are of the form 'S1', 'S2'
- Episodes are of the form 'E9', 'E10', 'E11 The Fall'
- Everything after a ',' can be ignored
- 'Article' is the default category
- Always have a title, season and episode
**/
@NonlinearFruit
NonlinearFruit / termsaver-quotes.py
Last active November 19, 2019 15:02
Plugin for termsaver to allow displaying quotes from local file
# git clone https://github.com/brunobraga/termsaver.git
# curl https://gist.githubusercontent.com/NonlinearFruit/07cca3536e321ec1b92045548ed192bd/raw -o termsaver/termsaverlib/screen/quotes.py
# curl https://gist.githubusercontent.com/NonlinearFruit/5ff69f8291b4d241a60ca445c06508bf/raw -o wcf.json
# curl https://gist.githubusercontent.com/NonlinearFruit/dda52038c29f26b83d337c82f25bdef8/raw -o wlc.json
# jq -r '.[] | . as $parent | .Sections[] | { title: $parent.Title, chapter: $parent.Chapter, section: .Section, content: .Content } | "\(.title) (WCF \(.chapter).\(.section))\n\(.content)\n\n"' wcf.json > wcf.saver
# jq -r '.[] | "\(.Question) (WLC \(.Number))\n\(.Answer)\n\n"' wlc.json >> wcf.saver
# python termsaver/termsaver quotes -p wcf.saver
import time
import sys
@NonlinearFruit
NonlinearFruit / ImpossibleCreaturesScientificNames.md
Last active April 25, 2020 16:05
Scientific (binomial) names for the various animals in Impossible Creatures

IC Scientific Names

Animal Scientific (Binomial) Name
Albatross Diomedea exulans
Anaconda Eunectes notaeus
Anglerfish Melanocetus johnsonii
Ant Iridomyrmex purpureus
Archerfish Toxotes chatareus
Armadillo Dasypus hybridus