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
/* Student's t-test (Two Independent Samples) */ /* -*- c -*- */ | |
/* Implemented in GNU bc by hackerb9, 2018. */ | |
/* Copyright assigned to FSF. */ | |
/* | |
* | |
* µ₀ - µ₁ | |
* t = ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
* ⎡ ⎤ ½ | |
* ⎢ (ΣA² - (ΣA)²/n₀) + (ΣB² - (ΣB)²/n₁) ⎛ 1 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
/* Student's t-test (Two Independent Samples) */ | |
/* Implemented in GNU bc by hackerb9, 2018. */ | |
/* Copyright assigned to FSF. */ | |
/* | |
* | |
* µ₀ - µ₁ | |
* t = ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
* ⎡ ⎤ ½ | |
* ⎢ (ΣA² - (ΣA)²/n₀) + (ΣB² - (ΣB)²/n₁) ⎛ 1 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
#!/usr/bin/python3 | |
# Sum of Factors. hackerb9 2018. | |
# This is a generalization of a certain type of numeric logic puzzle | |
# that gives you a hint by telling you that the previous hints were | |
# insufficient: that is, you now know that the answer is one that | |
# could be arrived at two different ways. Here's an example, as told | |
# by Jim Fixx in the 1970's: | |
############################################ |
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
If you want to give a link to a big PDF file, but you want it to open to some page by default, just append "#page=123". | |
http://harmonizer.s3.amazonaws.com/Harmonizer_vol59_no6_nov1999.pdf#page=40 |
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 | |
# gist.sh from https://github.com/kathawala/gist | |
# A bash script meant to take in user input, craft an API call to Github's Gist | |
# API and send the request, with content and filename filled in by the user | |
#Sends error on script failure | |
set -o errexit | |
USER=-uhackerb9 |
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
;;; -*- lisp -*- | |
;; Just for fun, playing around with making all my xterms lightly transparent. | |
;; NB: This makes titlebar and text transparent, too. | |
(if (is (window_class) "XTerm") | |
(spawn_async | |
(str "xprop -id " (window_xid) | |
" -f _NET_WM_WINDOW_OPACITY 32c" | |
" -set _NET_WM_WINDOW_OPACITY 0xf8000000"))) | |
;; Example: |
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 | |
# Watch files in the current working directory (or given argument) | |
# display how much a file has grown in the last second (or so) | |
# B9 2018 | |
if [ -d "$1" ]; then | |
cd "$1" | |
shift | |
fi |
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/sh | |
# nonraspbian - | |
# | |
# Find packages installed on my Pi which aren't from the official | |
# Raspberry Pi repositories. | |
aptitude search '?narrow(?installed,!?or(?origin("Raspberry Pi Foundation"),?origin("Raspbian")))' | |
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
# Some handy informal duration functions in Bourne shell (bash is fine, too). | |
# duration(): given seconds, returns commonsense equivalent duration. | |
# ago(): given seconds from epoch, compares to current time. | |
# howlongago(): show how long ago a file or subdir was last modified. | |
# given a file, shows how long ago that file was updated. | |
# given a directory, recursively searches for most | |
# recently changed FILE (not directory) |