This file contains 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
#!/bin/sh | |
xclip -o | qrencode -t PNG -o- > /tmp/qr.$$; notify-send -i "/tmp/qr.$$" -t 0 - |
This file contains 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
#!/bin/sh | |
pacmd set-default-sink `pacmd list-sinks | grep index | tail -n 1 | perl -ne 'print "$1\n" if /(\d+)/;'` |
This file contains 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
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode)) | |
(when (fboundp mode) (funcall mode -1))) | |
(set-terminal-coding-system 'utf-8) | |
(set-keyboard-coding-system 'utf-8) | |
(prefer-coding-system 'utf-8) | |
(load-library "iso-transl") | |
(defalias 'yes-or-no-p 'y-or-n-p) |
This file contains 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
/* | |
* Copyright (c) 2012 Brandon Jones | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. | |
* | |
* Permission is granted to anyone to use this software for any purpose, | |
* including commercial applications, and to alter it and redistribute it | |
* freely, subject to the following restrictions: |
This file contains 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
;; ramda-destruct | |
(defun ramda-destruct () | |
(interactive) | |
;; save-excursion does not work with replace. Can't use point since | |
;; the buffer contents are changing. | |
(let ((line (line-number-at-pos)) | |
(column (current-column))) | |
(shell-command-on-region (point-min) (point-max) "ramda-destruct" t t) | |
(goto-char (point-min)) | |
(forward-line (- line 1)) |
This file contains 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 bash | |
# Browse Ramda documentation in Terminal | |
# Requires jq and rofi for interactive filtering | |
LATEST="http://raine.github.io/ramda-json-docs/latest.json" | |
DOCS_URL="http://ramdajs.com/docs/" | |
cached=$XDG_CACHE_HOME/$(basename $LATEST) | |
if [[ ! -r "$cached" ]]; then |
This file contains 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
import bpy | |
for area in bpy.context.screen.areas: | |
for space in area.spaces: | |
if isinstance(space, bpy.types.SpaceView3D): | |
space.region_3d.view_camera_offset = (0, 0) | |
space.region_3d.view_camera_zoom = 0 |