This file contains hidden or 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/env zsh | |
# | |
### Thinkpad x220 config | |
xinput disable "SynPS/2 Synaptics TouchPad" | |
# Doc: https://www.x.org/wiki/Development/Documentation/PointerAcceleration/ | |
TP="TPPS/2 IBM TrackPoint" |
This file contains hidden or 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
;; Only tested with spacemacs | |
(defvar my-current-focus-symbol nil) | |
(make-variable-buffer-local 'my-current-focus-symbol) | |
(defvar my-focus-symbol-face 'hi-yellow) | |
(defun mouse-set-point-and-hl-symbol (event) | |
(interactive "e") | |
(mouse-set-point event) | |
;; Evil workaround crap (without this every other click visual state is activated...) |
This file contains hidden or 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/env python3 | |
# Requires the following preamble: | |
preamle = r""" | |
\usepackage{rotating} %% rotated column labels | |
\usepackage{colortbl} %% Colored cells | |
\usepackage{hhline} %% Borders that play nice with colortbl | |
\definecolor{lightgray}{gray}{0.8} | |
""" |
This file contains hidden or 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
function expectOne(array) { | |
if(array.length === 1) | |
return array[0]; | |
else | |
throw new Error("Expected one element, got " + array.length); | |
} | |
function findMediaTitle() { | |
var bag = expectOne(document.getElementsByClassName("playback-longpause-container")); |
This file contains hidden or 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
with builtins; | |
let | |
# evaluate expr, returning default on error | |
tryDefault = expr: default: | |
let res = (tryEval expr); | |
in if res.success then res.value else default; | |
isPython = pkg: pkg?name && (parseDrvName pkg.name).name == "python"; | |
hasPropagatedPython = pkg: |
This file contains hidden or 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
_nix_build_defexpr () { | |
local -a result | |
local -a queue=($1) | |
setopt local_options null_glob | |
while [[ ${#queue} > 0 ]]; do | |
local current=$queue[1] | |
shift queue | |
if [[ -e $current/default.nix ]]; then | |
result+=($current) | |
else |
NewerOlder