Skip to content

Instantly share code, notes, and snippets.

View georgewsinger's full-sized avatar

George Singer georgewsinger

  • NYC
View GitHub Profile
@4e6
4e6 / default.nix
Last active December 16, 2018 16:50
The result of running stackage2nix on stack git repo
# Generated by stackage2nix 0.7.0 from "./stack.yaml"
{ _nixpkgs ? import <nixpkgs> {} }:
let
stackageOverlay = builtins.fetchGit {
url = "https://github.com/typeable/nixpkgs-stackage.git";
rev = "0852a4b5097c576a4d42a6cd1fdb9e1746a85e3e";
};
nixpkgs = import <nixpkgs> {
overlays = [ (import stackageOverlay) ];
@mm--
mm-- / org-refile-hydra.el
Created March 9, 2017 21:52
Hydra for quickly refiling Org mode entries
;; Adapted from https://emacs.stackexchange.com/questions/8045/org-refile-to-a-known-fixed-location
(defun my/refile (file headline &optional arg)
"Refile to a specific location.
With a 'C-u' ARG argument, we jump to that location (see
`org-refile').
Use `org-agenda-refile' in `org-agenda' mode."
(let* ((pos (with-current-buffer (or (get-buffer file) ;Is the file open in a buffer already?
(find-file-noselect file)) ;Otherwise, try to find the file by name (Note, default-directory matters here if it isn't absolute)
//gcc osvrexample.c -losvrClientKit
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <osvr/ClientKit/ContextC.h>
#include <osvr/ClientKit/InterfaceC.h>
#include <osvr/ClientKit/InterfaceStateC.h>
(ns srs-c.utils.keyboard
(:require-macros
[klang.macros :refer [log! debg! trac! info! warn! erro! crit! fata! env!]]
[srs-c.macros :refer [onlydev onlyprod]])
(:require [goog.events])
(:import [goog.ui KeyboardShortcutHandler]))
(defn install-shortcut!
"Installs a Keyboard Shortcut handler.
@bhauman
bhauman / core.cljs
Last active August 16, 2022 12:08
Helpful patterns when developing with ClojureScript Figwheel and Express js
(ns todo-server.core
(:require
[cljs.nodejs :as nodejs]
[figwheel.client :as fw]))
(nodejs/enable-util-print!)
(defonce express (nodejs/require "express"))
(defonce serve-static (nodejs/require "serve-static"))
(defonce http (nodejs/require "http"))