Skip to content

Instantly share code, notes, and snippets.

@shakna-israel
shakna-israel / crusher
Created August 11, 2018 04:43
crush all the images!
#!/bin/bash
png() {
w=$(mktemp)
pngcrush -brute "$1" "$w"
rm "$1"
mv "$w" "$1"
du -b "$1"
}
@shakna-israel
shakna-israel / .vimrc
Last active March 21, 2018 07:12
A simple vim
set nocompatible " must be the first line
filetype on
filetype indent on
filetype plugin on
set nowrap
set laststatus=2
set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
set ofu=syntaxcomplete#Complete
" Above is SSH compatibility fixes
flflnitzd fiatzs t$matt
WASHINGTON, DC 20510
November 15, 2017
The Honorable David L. Hunt
Inspector General
#include <EEPROM.h>
#include "base64.hpp"
void help() {
Serial.println(F("Ardl Helpfile\n"
"\n"
"System Limitations:\n"
"Maximum Input Length: 255 characters\n"
"CPU Speed: 8Mhz\n"
"\n"
@shakna-israel
shakna-israel / Original regex
Created January 30, 2018 16:57
Perl Email::Valid regex
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()
@shakna-israel
shakna-israel / # tcc - 2018-01-08_20-04-19.txt
Created January 8, 2018 09:17
tcc on macOS 10.13.2 - Homebrew build logs
Homebrew build logs for tcc on macOS 10.13.2
Build date: 2018-01-08 20:04:19
@shakna-israel
shakna-israel / keybase.md
Created January 31, 2017 23:40
keybase.md

Keybase proof

I hereby claim:

  • I am shakna-israel on github.
  • I am shakna (https://keybase.io/shakna) on keybase.
  • I have a public key whose fingerprint is CE67 2507 AB85 EA82 46A5 D3B6 A089 B2D6 AA04 9EFE

To claim this, I am signing this object:

@shakna-israel
shakna-israel / unittest.scm
Created July 1, 2016 13:12
Unit Testing Framework for Scheme
;
; Unit test framework for scheme, originally by http://c2.com/cgi/wiki?JohnClonts
; Heavily modified by me, https://github.com/shakna-israel
;
#|
This is a brain-dead simple unit-testing framework.
It differs wildly from John Clonts' which is where it began life (http://c2.com/cgi/wiki?SchemeUnit), but that was mainly aimed at number equivalency testing.
Basic Usage:
@shakna-israel
shakna-israel / directory_tree
Created April 5, 2016 18:34
Zappa Folder Structures
```
.
├── curlTimerFormat.txt
├── env
│   ├── bin
│   │   ├── activate
│   │   ├── activate.csh
│   │   ├── activate.fish
│   │   ├── activate_this.py
│   │   ├── aws
@shakna-israel
shakna-israel / nginx.conf
Created January 14, 2015 09:16
Nginx Reverse Proxy
server {
listen 80;
server_name example.org;
access_log /var/log/nginx/example.log;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;