Skip to content

Instantly share code, notes, and snippets.

View fidiego's full-sized avatar
💭
🤔

Dat Boi Diego fidiego

💭
🤔
View GitHub Profile
@max-sixty
max-sixty / config.kdl
Last active January 12, 2024 08:16
Zellij Config
// This Zellij config offers a more modal experience than the default. There are
// very few keybindings in the mode that you spend most of your time in, and we
// need to hit `C-space` to go into a mode where we navigate.
// The only keybindings in the normal mode are:
// - `C-space` to go into the tmux mode
// - `C-n` for a new pane
// - `C-t` for a new tab
// - `A-[` & `A-]` to go to the previous/next tab
// - `S-arrow` to navigate between panes
@kmontenegro
kmontenegro / CoSBooks.md
Last active June 23, 2017 21:08
Quick list of books relating to migration for #ColorOfSurveillance
  • Life During Wartime explores the use of counterinsurgency practices by domestic US law enforcement. The border section is valuable although the entire book has useful infomation to understand policing.
  • Targeted is a classic which documents the early stages of immigrant enforcement & detention as a profit model.
  • Undoing Border Imperialism presents a radical reframing of how we talk about borders, empire, migration, and resistance. While a little dated, really valuable for a radical and people power based analysis.
  • Violent Borders has an international view of the violence of borders.

To me, I also think the work of Fanon and [Edward Said](http://www.arabstereot

@dlebech
dlebech / cache.py
Created March 20, 2016 16:51
Python LRU cache that works with coroutines (asyncio)
"""Global LRU caching utility. For that little bit of extra speed.
The caching utility provides a single wrapper function that can be used to
provide a bit of extra speed for some often used function. The cache is an LRU
cache including a key timeout.
Usage::
import cache
@cache.memoize
@ChillyBwoy
ChillyBwoy / core.cljs
Created May 22, 2014 23:54
Simple particles in ClojureScript
(ns particles.core)
(def display (.getElementById js/document "display"))
(def context (.getContext display "2d"))
(def damping 0.999)
(def max-particles 250)
(def line-width 2)
(def app-state (atom {:width (.-innerWidth js/window)
:height (.-innerHeight js/window)}))
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mattsgarrison
mattsgarrison / merge_pdfbox.py
Created August 31, 2011 15:35
Jython script to use Apache PDFBox to merge PDFs into a single file.
import sys
from java.io import *
import java.io.InputStream
import java.io.FileInputStream
import java.lang.String # blah....converting String types between Java/Python is tedious
sys.path.append("pdfbox-1.0.0.jar") # or wherever you stashed it
import org.apache.pdfbox
"""
This method merges the FileInputStreams that the streamList points to, into the