Skip to content

Instantly share code, notes, and snippets.

@Perlence
Perlence / darksouls2-freepie.py
Created April 26, 2014 21:16
Mouse bindings and helpers for Dark Souls II
"""
Mouse bindings and helpers for Dark Souls II
============================================
Features
--------
- Attack with left and right mouse buttons with no delay.
- Execute combos in one key press.
- Close dialogs with Escape.
@Perlence
Perlence / ln.py
Created June 12, 2014 10:05
Analog of Unix 'ln' for Windows since Vista
"""Analog of Unix ``ln`` for Windows since Vista."""
import sys
import os
import subprocess
if len(sys.argv) < 3:
sys.exit('usage: ln.py TARGETS DEST')
args = map(os.path.abspath, sys.argv[1:])
targets, dest = args[:-1], args[-1]
os.chdir(dest)
@Perlence
Perlence / sm.py
Last active February 26, 2021 01:55
Run all maps from subdirectories (Quake)
from __future__ import print_function
import sys
import subprocess
from os.path import isfile, join, splitext, sep, normpath
from glob import glob
ENGINE = 'quakespasm\\0.91.0\\quakespasm.exe'
GAME = 'sm'
QARGS = ['-heapsize', '256000',
@Perlence
Perlence / cb-exit.py
Last active August 29, 2015 14:12
Custom flake8-passing cb-exit
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import subprocess
import getpass
class CBExit(object):
def __init__(self):
@Perlence
Perlence / semaphore.go
Created January 31, 2015 21:11
Semaphore in Go
package semaphore
type Semaphore chan bool
func (self Semaphore) Acquire() {
self <- true
}
func (self Semaphore) Release() {
<-self
@Perlence
Perlence / pocket-solarized.css
Last active August 29, 2015 14:22
Solarized Light and Dark themes for Pocket
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("https://getpocket.com/a/read") {
/* Common */
.page-readerdark .reading_progress_bar,
.page-readersepia .reading_progress_bar {
background-color: #2aa198; /* cyan */
}
code, pre {
font-size: 19px;
@Perlence
Perlence / .mintty-gruvbox
Last active January 19, 2017 17:25
gruvbox color scheme for mintty
# Based on dark mode of gruvbox color scheme https://github.com/morhetz/gruvbox/
ForegroundColour=235,219,178
BackgroundColour=40,40,40
CursorColour=235,219,178
Black=40,40,40
BoldBlack=146,131,116
Red=204,36,29
BoldRed=251,73,56
Green=152,151,26
BoldGreen=184,187,38
@Perlence
Perlence / gulpfile.js
Created October 22, 2015 21:12
Browserify, watchify, exit with status 1 on uglify
'use strict'
var browserify = require('browserify')
var gulp = require('gulp')
var plumber = require('gulp-plumber')
var gutil = require('gulp-util')
var uglify = require('gulp-uglify')
var buffer = require('vinyl-buffer')
var source = require('vinyl-source-stream')
var watchify = require('watchify')
@Perlence
Perlence / reader-solarized.css
Last active August 15, 2021 06:59
Solarized Light and Dark themes for Firefox Reader
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("about:reader") {
body.light {
color: #657b83; /* base00 */
background-color: #fdf6e3; /* base3 */
}
body.dark {
color: #839496; /* base0 */
@Perlence
Perlence / .mintty-solarized-dark
Last active December 8, 2015 16:51
Solarized color scheme for mintty
# Based on dark mode of Solarized color scheme http://ethanschoonover.com/solarized
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=131,148,150
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117