Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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"))
(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 / 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"]
@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 / nim.clj
Last active August 29, 2015 14:07
nim codewar
(ns nim)
(defn nim-sum [state]
(apply bit-xor state))
(defn next-move [[i k] state]
(cond
(<= (inc k) (nth state i)) [i (inc k)]
(and (< (inc i) (count state)) (not= (nth state (inc i)) 0)) [(inc i) 1]
(>= (inc i) (dec (count state))) nil
@gzmask
gzmask / change.clj
Last active August 29, 2015 14:07
Counting Change Combinations codewars
(ns count-change)
(defn cart [colls]
(if (empty? colls)
'(())
(for [x (first colls)
more (cart (rest colls))]
(cons x more))))
(defn noseq? [x]
set gdefault
" colorscheme
set cuc cul
hi CursorColumn ctermbg=17
hi CursorLine cterm=none ctermbg=17
if has("gui_running")
colorscheme torte
set transparency=15
endif