Skip to content

Instantly share code, notes, and snippets.

@gzmask
gzmask / user.behaviors
Last active August 29, 2015 14:05
.lighttable
;; Your file has been converted to the new flat format.
;; Conversion does not preserve comments or indentation.
;; File is backed up at C:\Users\lei203\AppData\Local\LightTable\User\user.behaviors.bak
[
[:app :lt.objs.style/set-skin "dark"]
[:app :lt.objs.sidebar.workspace/workspace.open-on-start]
[:app :lt.plugins.vim/map-keys {",L" ":ltexec paredit.shrink.right",
",l" ":ltexec paredit.grow.right",
"gT" ":ltexec tabs.prev",
"gt" ":ltexec tabs.next",
@gzmask
gzmask / cVimrc
Last active June 19, 2017 21:51
cVimrc
" Settings
set nohub
set nosmoothscroll
set noautofocus "The opposite of autofocus; this setting stops sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 10
let scrollstep = 100
let barposition = "bottom"
let hintcharacters = "asdfgqwertzxcvb1234"
let completionengines = ["google", "amazon", "imdb", "dogpile"]
(ns richeverpos.handler
(:use compojure.core
ring.adapter.jetty
richeverpos.index_page)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(GET "/" [] (index-page))
(route/resources "/")
@gzmask
gzmask / handler.clj
Created May 21, 2013 01:57
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: index-page in this context, compiling:(richever_clj/handler.clj:8:15)
(ns richever_clj.handler
(:use compojure.core
hiccup.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(GET "/" [] (index-page))
(route/resources "/")
(route/not-found "Not Found"))
@gzmask
gzmask / promise.js
Created July 25, 2012 20:01
[TypeError: Cannot call method 'call' of undefined]
var Browser = require("zombie");
var expect = require("expect.js");
browser = new Browser();
browser.visit("http://somedomain.com").
then(function () {
console.log("yo");
return fill("username", "monkeyeater").fill("password", "ispassed");
}).
then(function () {
@gzmask
gzmask / pe3.hs
Created June 19, 2012 21:16
project euler Problem 3
num = 600851475143
nums = reverse [1..600851475143]
isPrime :: (Integral a) => a -> Bool
isPrime x = (product $ map (mod x) [2..(x-1)]) /= 0
getPrimes :: (Integral a) => [a] -> [a]
getPrimes xs = filter isPrime $ xs
primes = getPrimes nums
@gzmask
gzmask / gist:2783950
Created May 24, 2012 20:16
donation block error
ojs2 has produced an error Message: WARNING: Missing argument 2 for DonationBlockPlugin::getContents(), called in /Library/Server/Web/Data/Sites/Default/ojs/lib/pkp/classes/plugins/BlockPlugin.inc.php on line 159 and defined In file: /Library/Server/Web/Data/Sites/Default/ojs/plugins/blocks/donation/DonationBlockPlugin.inc.php At line: 72 Stacktrace: File: /Library/Server/Web/Data/Sites/Default/ojs/plugins/blocks/donation/DonationBlockPlugin.inc.php line 72 Function: PKPApplication->errorHandler(2, "Missing argument 2 for DonationBlockPlugin::getContents(), called in /Library/Server/Web/Data/Sites/Default/ojs/lib/pkp/classes/plugins/BlockPlugin.inc.php on line 159 and defined", "/Library/Server/Web/Data/Sites/Default/ojs/plugins/blocks/donation/DonationBlockPlugin.inc.php", 72, Array(1)) File: /Library/Server/Web/Data/Sites/Default/ojs/lib/pkp/classes/plugins/BlockPlugin.inc.php line 159 Function: DonationBlockPlugin->getContents(Object(TemplateManager)) File: (unknown) line (unknown) Function: BlockPlugin->c
corwin:naclray1 ray$ ./scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/Users/ray/projects/native_client_sdk_0_5_1052/toolchain/mac_x86/bin/nacl-g++ -o dbg_x86_32/naclray1.o -c -std=gnu++98 -Wno-long-long -Wall -Wswitch-enum -pthread -O0 -g -m32 -D_GNU_SOURCE=1 -D__STDC_FORMAT_MACROS=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 naclray1.cc
naclray1.cc: In member function 'virtual void Naclray1Instance::HandleMessage(const pp::Var&)':
naclray1.cc:59: error: 'FileIO' is not a member of 'pp'
naclray1.cc:59: error: expected ';' before 'file1'
scons: *** [dbg_x86_32/naclray1.o] Error 1
scons: building terminated because of errors.
corwin:naclray1 ray$ ./scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/Users/ray/projects/native_client_sdk_0_5_1052/toolchain/mac_x86/bin/nacl-g++ -o dbg_x86_32/naclray1.o -c -std=gnu++98 -Wno-long-long -Wall -Wswitch-enum -pthread -O0 -g -m32 -D_GNU_SOURCE=1 -D__STDC_FORMAT_MACROS=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 naclray1.cc
naclray1.cc: In member function 'virtual void Naclray1Instance::HandleMessage(const pp::Var&)':
naclray1.cc:59: error: 'FileIO' is not a member of 'pp'
naclray1.cc:59: error: expected ';' before 'file1'
scons: *** [dbg_x86_32/naclray1.o] Error 1
scons: building terminated because of errors.
@gzmask
gzmask / example.xml
Created August 24, 2011 21:20
rapidxml parsing error
<DISTRIBUTIONS>
<DIST TYPE="discrete">
<PRIVATE NAME="Alarm"/>
<CONDSET>
<CONDELEM NAME="Burglary"/>
<CONDELEM NAME="Earthquake"/>
</CONDSET>
<DPIS>
<DPI INDEXES="0 0 ">0.95 0.05 </DPI>