This file contains hidden or 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
| // @name HN Black Font | |
| // @description Make text black on HN | |
| // @homepage https://gist.github.com/1600378/ | |
| // @match https://news.ycombinator.com/* | |
| // @match http://news.ycombinator.com/* | |
| // @run-at document-start | |
| (function() { | |
| var css, head, node; | |
| css = "td { color: #000000; }"; | |
This file contains hidden or 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
| ; Depends on importer.clj | |
| (ns gltut.glapi (:use [gltut.importer])) | |
| (import-method org.lwjgl.opengl.GL11 glArrayElement gl-array-element) | |
| (import-method org.lwjgl.opengl.GL11 glLineStipple gl-line-stipple) | |
| (import-method org.lwjgl.opengl.GL11 glDrawArrays gl-draw-arrays) | |
| (import-method org.lwjgl.opengl.GL11 glDrawElements gl-draw-elements) | |
| (import-method org.lwjgl.opengl.GL11 glBlendFunc gl-blend-func) | |
| (import-method org.lwjgl.opengl.GL11 glDrawPixels gl-draw-pixels) |
This file contains hidden or 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
| ; A set of functions that generates Clojure code which in turn imports | |
| ; static methods from a class. Depends on importer.clj | |
| (ns gltut.macro-generator | |
| (:use [gltut.importer]) | |
| (:require [clojure.string :as s] | |
| [clojure.java.io :as io]) | |
| (:import [org.lwjgl.opengl GL11 GL12 GL13 GL14 GL15 GL20 GL21 GL30 GL31 GL32 | |
| GL33 GL40 ])) |
This file contains hidden or 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
| (ns gltut.importer | |
| (:import [java.lang.reflect Method Field])) | |
| (defn get-methods | |
| "Return all the methods on a class" | |
| [#^Class cls] | |
| (into [] (. cls getMethods))) | |
| (defn get-fields | |
| "Return all the fields on a class" |
This file contains hidden or 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
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Copyright (c) Rich Hickey. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
| ; which can be found in the file CPL.TXT at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| ;dimensions of square world |
This file contains hidden or 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
| ;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
| (defmacro local-bindings | |
| "Produces a map of the names of local bindings to their values." | |
| [] | |
| (let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)] | |
| (zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols))) | |
| (declare *locals*) | |
| (defn eval-with-locals |
This file contains hidden or 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
| ;; add this to your ~/.emacs or ~/.emacs.d/init.el file | |
| ;; jump parens | |
| (defun match-paren (arg) | |
| (interactive "p") | |
| (cond | |
| ((looking-at "\\s\(") (forward-list 1) (backward-char 1)) | |
| ((looking-at "\\s\)") (forward-char 1) (backward-list 1)) | |
| ((looking-at "\\s\{") (forward-list 1) (backward-char 1)) | |
| ((looking-at "\\s\}") (forward-char 1) (backward-list 1)) |
This file contains hidden or 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
| # Defaults that we'll need | |
| include_recipe "apt" | |
| package "vim" | |
| package "screen" | |
| package "git-core" | |
| package "mercurial" | |
| package "subversion" | |
| package "python" |
This file contains hidden or 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
| """ | |
| jQuery templates use constructs like: | |
| {{if condition}} print something{{/if}} | |
| This, of course, completely screws up Django templates, | |
| because Django thinks {{ and }} mean something. | |
| Wrap {% verbatim %} and {% endverbatim %} around those | |
| blocks of jQuery templates and this will try its best |
This file contains hidden or 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
| css = """ | |
| div.Bk { | |
| font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
| } | |
| textarea { | |
| font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
| } | |
| td > div { | |
| font-family: DejaVu Sans Mono, Courier, Monospace !important; | |
| } |