Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
@jrk
jrk / bootstrap.log
Created May 20, 2011 23:11
GODI Homebrew install errors
Using PATH=/usr/local/Cellar/godi/3.12/bin:/usr/local/Cellar/godi/3.12/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/narwhal/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Users/jrk/.cabal/bin:/Users/jrk/bin:/usr/local/cuda/bin:/usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/local/share/npm/bin:/usr/local/sbin:/Applications/Pixar/RenderMan.app/Versions/RenderManProServer-14.3/bin:/usr/local/bin:/usr/X11R6/bin:/Applications/Matlab/bin:/Developer/Tools:/Users/jrk/Projects/PFC/bin:/usr/local/Cellar/depot_tools/CURRENT:/Users/jrk/.rvm/bin:/Users/jrk/.rip/active/bin:/usr/local/Library/Contributions/examples
./configure -no-curses -no-shared-libs -no-pthread
cd byterun; /usr/bin/make libcamlrun.a
Makefile:16: ../config/Makefile: No such file or directory
make[1]: *** No rule to make target `../config/Makefile'. Stop.
make: *** [build] Error 2
make: *** Waiting for unfinished jobs....
Confi
@jrk
jrk / welcome.md
Created September 29, 2011 03:55

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

@jrk
jrk / Test.md
Created September 29, 2011 03:56

Test

%% Example usage:
%% \squishlist %% \begin{itemize}
%% \item First item
%% \item Second item
%% \squishend %% \end{itemize}
\newcommand{\squishlist}{
\begin{list}
{$\bullet$} { \setlength{
\itemsep}{0pt} \setlength{\parsep}{3pt} \setlength{\topsep}{3pt} \setlength{
\partopsep}{0pt} \setlength{\leftmargin}{1.5em} \setlength{\labelwidth}{1em} \setlength{\labelsep}{0.5em} } }
TEMPLATE = lib
CONFIG += qt thread debug_and_release staticlib
DESTDIR = "../lib"
CONFIG( debug, debug|release ) {
TARGET = libcgt_cored
} else {
TARGET = libcgt_core
DEFINES += _SECURE_SCL=0
@jrk
jrk / test_atomics.ml
Created October 24, 2012 20:01
Test for LLVM atomics from OCaml through C
open Llvm
open Llvm_bitwriter
let _ =
let c = global_context () in
let m = create_module c "mod" in
let b = builder c in
let i32_t = i32_type c in
let ptr_t = pointer_type i32_t in
@jrk
jrk / gist:3949931
Created October 25, 2012 01:17
Valid chunk choices
f(v0, v1) = v0*v1
g(v2, v3, v4) = f(v2, v3)
h(v5, v6) = g(v5, v6, 0) + g(v5, v6, 1)
h.root() // h is output, so this is implicit
// this means:
[allocate h]
for all v6:
for all v5:
h[v5,v6] = g(v5,v6,0) + g(v5,v6,1)
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt
# Usage within SublimeClang:
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ${project_path:build}/compile_commands.json",
import re
import os
import os.path
@jrk
jrk / bash_profile
Last active December 15, 2015 10:48
Halide tutorial
# TODO: set this to the path to Halide/cpp on your machine:
export HL_ROOT=${HOME}/path/to/Halide/cpp
export PATH=${HL_ROOT}/bin:${PATH}
export LD_LIBRARY_PATH=${HL_ROOT}/bin:${LD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH=${HL_ROOT}/bin:${DYLD_LIBRARY_PATH}
export CFLAGS="-I${HL_ROOT}/include $(llvm-config --cflags) ${CFLAGS}"
export LDFLAGS="-L${HL_ROOT}/bin -lHalide -lpthread -ldl -L$(llvm-config --libdir) $(llvm-config --libs bitwriter bitreader x86 arm linker nvptx ipo mcjit jit) ${LDFLAGS}"
@jrk
jrk / CImg.h
Last active December 16, 2015 22:19
forresti convolution test
This file has been truncated, but you can view the full file.
/*
#
# File : CImg.h
# ( C++ header file )
#
# Description : The C++ Template Image Processing Toolkit.
# This file is the main component of the CImg Library project.
# ( http://cimg.sourceforge.net )
#
# Project manager : David Tschumperle.