Skip to content

Instantly share code, notes, and snippets.

@gs
gs / gist:3096729
Created July 12, 2012 08:33
Sublime 2 Plugins that I found useful in RoR developement
@gs
gs / git usr
Last active December 18, 2015 04:59
get user name (need for merging with squash)
in .gitconfig
[alias]
usr = !git-usr
git-usr
git log -n200 --format='%an <%ae>'| grep $1 | uniq
@gs
gs / open todo files
Created December 12, 2013 14:16
open todo files from google drive/tasks
import os
import glob
import sublime_plugin
class OpenTasks(sublime_plugin.TextCommand):
def run(self, args):
self.files = glob.glob(os.path.expanduser('~/Google Drive/tasks' + '/*.TODO'))
if self.files and len(self.files) == 1:
self.view.window().open_file(self.files.get())
else:
elseif match(a:filename, '_test\.py$') != -1
" exec ":testify " . a:filename
exec ":silent !echo testify " . a:filename . " |pbcopy"
@gs
gs / 1
Created October 5, 2019 17:36
Retrieving com/datomic/datomic-pro/0.9.5966/datomic-pro-0.9.5966.jar from my.datomic.com
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: Syntax error compiling at (figwheel_sidecar/repl.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7647)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:428)
at clojure.core$load$fn__6824.invoke(core.clj:6126)
[Figwheel:WARNING] Compile Warning src/cljs/timerack/core.cljs line:18 column:3
reagent.core/render is deprecated
13 (rfe/start!
14 (rf/router routes {:data {:coercion rss/coercion}})
15 (fn [m] (reset! state/route m))
16 ;; set to false to enable HistoryAPI
17 {:use-fragment true})
18 (r/render [root] (. js/document (getElementById "app"))))
(defn speak-it
"Call the google translate with language and value of the atom"
[lang]
(let [speech-syn (.-speechSynthesis js/window)]
(def msg (js/SpeechSynthesisUtterance. @number))
(aset msg "lang" lang)
(.speak speech-syn msg)))
@gs
gs / lein repl
Created June 8, 2021 06:51
lein repl expception
C02XN106JHD4:aging grzegorz$ lein repl
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(main.java:20)
Caused by: Syntax error compiling at (clojure/core.clj:338:1).
at clojure.lang.Compiler.load(Compiler.java:7648)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:424)
@gs
gs / exception
Created November 5, 2021 20:37
lein figwheel fails
➜ kotek lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Compiling build :dev to "resources/public/js/compiled/kotek.js" from ["src"]...
Successfully compiled build :dev to "resources/public/js/compiled/kotek.js" in 0.293 seconds.
clojure.lang.ExceptionInfo: Error in component :figwheel-system in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :figwheel-system, :component #figwheel_sidecar.system.FigwheelSystem{:system #object[clojure.lang.Atom 0x4269ff03 {:status :ready, :val #<SystemMap>}]}, :system #<SystemMap>}
at com.stuartsierra.component$try_action.invokeStatic(component.cljc:120)
➜ clojure lein new figwheel-main test_app -- --reagent
Generating fresh figwheel-main project.
To get started:
--> Change into the 'test_app' directory
--> Start build with 'lein fig:build'
➜ clojure cd test_app
➜ test_app lein fig:build
2021-11-05 23:06:56.678:INFO::main: Logging initialized @1656ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel] Validating figwheel-main.edn