Skip to content

Instantly share code, notes, and snippets.

View vgeddes's full-sized avatar

Vincent Geddes vgeddes

  • Cape Town, South Africa
View GitHub Profile
@vgeddes
vgeddes / runjs.d.ts
Last active March 31, 2018 01:40
TypeScript declarations for runjs
declare module 'runjs' {
export interface Options {
cwd?: string,
async?: boolean,
stdio?: string | Array<any>,
env?: object,
timeout?: number
}
@vgeddes
vgeddes / conftest.py
Created March 14, 2018 16:00 — forked from poliarush/conftest.py
How to create shared object instance thru fixture with pytest xdist
import pytest
from random import randint
import logging
import pickle
logging.basicConfig(filename="log.log", level=logging.INFO)
class App(object):
def __init__(self):
self.a = randint(0, 100)
!! Xft
!!
Xft.antialias: true
Xft.hinting: true
Xft.hintstyle: hintfull
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
Xft.dpi: 96
!! URxvt
@vgeddes
vgeddes / anonymous-gist.js
Created January 3, 2014 13:47
testing for other things during state transitions
it('should ask for confirmation', function (done) {
var user = {
current_state: 'state_potential_confirm',
answers: {
state_main_menu: 'state_check_consultant_show',
state_mobile_number: '1234567890',
state_potential_first_name: 'sam',
state_potential_last_name: 'pieters',
state_potential_id_known: 'yes',
state_potential_id_number: '1234567890123'
@vgeddes
vgeddes / yagist.el
Created December 27, 2013 18:56
foo.el
;;; yagist.el --- Yet Another Emacs integration for gist.github.com
;; Author: Christian Neukirchen <purl.org/net/chneukirchen>
;; Maintainer: Masahiro Hayashi <mhayashi1120@gmail.com>
;; Contributors:
;; Will Farrington <wcfarrington@gmail.com>
;; Michael Ivey
;; Phil Hagelberg
;; Dan McKinley
;; Version: 20131025.1740
Contacting host: api.github.com:443
Paste created: https://gist.github.com/7634041
byte-code: End of buffer [2 times]
Creating customization items...
Creating group...
Creating group entries...done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
(require 'path-headerline-mode)
(require 'pydoc-info)
(setq prelude-flyspell nil)
(setq prelude-whitespace nil)
(require 'path-headerline-mode)
(setq x-select-enable-clipboard t)
(add-hook 'prog-mode-hook 'whitespace-turn-off t)
(defun disable-guru-mode ()
(guru-mode -1))
(setq custom-theme-directory "~/.emacs.d/themes")
(add-hook 'prelude-prog-mode-hook 'disable-guru-mode t)
(add-hook 'prelude-prog-mode-hook 'turn-off-flyspell t)
@vgeddes
vgeddes / gist:7447900
Created November 13, 2013 11:56
Einstein.js
sin = Math.sin;
cos = Math.cos;
PI = Math.PI;
sqrt = Math.sqrt;
theta = function(t) {
return t > 0 ? 1 : 0;
};
sgn = function(t) {
return t ? t < 0 ? -1 : 1 : 0;