Skip to content

Instantly share code, notes, and snippets.

View adamryman's full-sized avatar

Adam Ryman adamryman

View GitHub Profile
@lelandbatey
lelandbatey / persistant_checklist.html
Last active October 30, 2016 23:27
Turn html lists into checklists; great for markdown
<script>
var checkboxes = [];
function getCheckboxStates() { return checkboxes.map(bx => !!bx.checked); };
function saveCheckboxStates() {
localStorage['boxStates'] = JSON.stringify(getCheckboxStates());
}
// Add a checkbox in front of every list item, save reference to each
[].slice.call(document.getElementsByTagName('li')).forEach((li, index) => {
var chkbx = document.createElement('input');
@jeffsharpe
jeffsharpe / arch-install-uefi-gpt-lvm_on_luks.sh
Last active July 28, 2022 20:15
Arch Linux Installation Notes - UEFI GPT LVM on LUKS (single drive)
### Arch Linux Installation Notes
### UEFI GPT LVM on LUKS (single drive)
###
### These are my personal notes to install Arch. Its not a script, but step by step instructions. If using
### please be aware that every step should be considered before applying, to personalize your
### installations appropriately.
###
# boot to arch linux boot prompt
anonymous
anonymous / sites-available.conf
Created September 16, 2015 02:46
sites-available.conf
<VirtualHost *:80>
ServerAdmin example@gmail.com
Header set Access-Control-Allow-Origin "*"
ServerName whereis.example.com
# Proxy settings
ProxyRequests Off
<Proxy *>
@lelandbatey
lelandbatey / recursive_link_grab.py
Last active October 15, 2021 23:59
Recursive link gatherer -- great for `wgetting` an Apache directory
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@framon
framon / rebase_first_commit.sh
Last active April 3, 2019 23:57
Insert commit as first, allowing rebase of initial commit
# first you need a new empty branch; let's call it `newroot`
git checkout --orphan newroot
git rm -rf .
# then you apply the same steps
git commit --allow-empty -m 'root commit'
git rebase --onto newroot --root master
git branch -d newroot
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000