Skip to content

Instantly share code, notes, and snippets.

@neeasade
neeasade / cParse.sh
Created May 18, 2015 05:14
cParse.sh - xboxdrv script
#!/bin/sh
# cParse.sh
# a script to parse input from xboxdrv
# Usage : xboxdrv | cParse.sh
# makes cursor align with left joystick around a centerpoint
# depends on xdotool to do the cursor moving
# define a 'center' x,y
cX=400
cY=400
#!/usr/bin/env bash
# depends: dmenu slop xdotool
# assumes next spawned window will be floating/moveable by xdotool.
# get program name to launch using dmenu cache:
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
else
cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
@neeasade
neeasade / elisp
Created March 19, 2018 12:19
org-pomoro music hook and display workflow
#!/bin/sh
result="$(emacsclient --eval "(progn $@)")"
if [ "$result" = "nil" ] || [ -z "$result" ]; then
exit 1
else
echo "$result"
exit 0
fi

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link below in the summary jumps at the answer on this page.
  • The link on the question itself points back at the original post.

Summary

@neeasade
neeasade / read_only_filesystem.py
Created January 18, 2019 14:10 — forked from cocagne/read_only_filesystem.py
Per-process, read-only filesystem view via Linux's unshare() system call
#!/usr/bin/python
import ctypes
import os
import sys
def err_exit( msg ):
print >> sys.stderr, msg
sys.exit(1)
@neeasade
neeasade / irc.md
Created March 24, 2019 14:15 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@neeasade
neeasade / server.sh
Last active January 22, 2021 13:23
netcat http keyval memory store || clojure tic tac toe
#!/usr/bin/env bash
# a nc server thing that I was kinda curious if it would work
# depends on: nc (netcat), bash 4.0(hashmaps/assoc arrays)
port=4000
declare -A items
items[test]="woooooo"
# quick refresher:
@neeasade
neeasade / nixos.md
Created November 22, 2019 03:56 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root
@neeasade
neeasade / Documentation.md
Last active August 19, 2020 01:30 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@neeasade
neeasade / Links in markdown.md
Last active July 30, 2021 14:58 — forked from jesstelford/Links in markdown.md
Putting links in code blocks on GitHub