Skip to content

Instantly share code, notes, and snippets.

View ixmatus's full-sized avatar

Parnell Springmeyer ixmatus

View GitHub Profile
@lstoll
lstoll / gist:2411499
Created April 18, 2012 06:41 — forked from lclarkmichalek/gist:1657284
Flymake mode for golang
(require 'flymake)
(defun flymake-go-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "go" (list "build" "-o" "/dev/null" temp-file))))
@fukubaya
fukubaya / emacs-24.1-lion-fullscreen-test.patch
Created June 13, 2012 16:29
MaxOSX Lion fullscreen patch for emacs 24.1
--- src/nsterm.m.orig 2012-06-14 01:05:10.000000000 +0900
+++ src/nsterm.m 2012-06-14 01:07:56.000000000 +0900
@@ -5507,6 +5507,7 @@
[win setAcceptsMouseMovedEvents: YES];
[win setDelegate: self];
[win useOptimizedDrawing: YES];
+ [win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
sz.width = FRAME_COLUMN_WIDTH (f);
sz.height = FRAME_LINE_HEIGHT (f);
@FiloSottile
FiloSottile / rasterize.js
Created May 12, 2012 15:38
PhantomJS rasterize.js with "Retina" output
var page = require('webpage').create(),
address, output, size;
if (phantom.args.length < 2 || phantom.args.length > 3) {
console.log('Usage: rasterize.js URL filename');
phantom.exit();
} else {
address = phantom.args[0];
output = phantom.args[1];
page.viewportSize = { width: 1280, height: 1024 };
@jpetazzo
jpetazzo / README.md
Last active September 30, 2022 05:36
Share a directory with a docker container

Rectifier

The diode bridge is the simplest rectifier I know.

Rectifier lets you share a directory with a docker container (just like $yourvm shared folders).

You don't have to install anything in your containers, and you only need to install diod in the host. diod is packaged on Ubuntu/Debian distros, and will automatically be apt-get install-ed if needed.

Since it uses diod to make a bridge, I called it rectifier. Yeah, that sucks, so if you have a better name, I'll steal it!

@jsomers
jsomers / websters-kindle.mdown
Created May 19, 2014 01:42
How to make the Webster's 1913 your default Kindle dictionary

How to make the Webster's 1913 your default Kindle dictionary

  1. Download a Kindle-compatible version of the dictionary here. Unzip the .rar archive.

  2. Get the "Send to Kindle" program on your computer. Here's the link for the Mac.

  3. Right-click your recently downloaded (unzipped) dictionary file, and click the "Send to Kindle" menu item. It will arrive on your Kindle shortly.

  4. Once the dictionary has arrived, go to your settings -- on my newish paperwhite, it's at Home > Settings > Device Options > Language and Dictionaries > Dictionaries > English. Choose the Webster's 1913.

@sirkonst
sirkonst / docker-prune.service
Created November 22, 2018 12:25
Remove unused docker resources with systemd (service and timer)
[Unit]
Description=Remove unused docker resources
Documentation=https://docs.docker.com/v17.09/engine/admin/pruning/
After=docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/docker system prune -f --filter "until=744h"
ExecStart=/usr/bin/docker volume prune -f