Skip to content

Instantly share code, notes, and snippets.

View rundis's full-sized avatar

Magnus Rundberget rundis

View GitHub Profile
@rundis
rundis / gist:4979604
Created February 18, 2013 18:43
Sample workaround to get (troublesome ? ) classes into the gradle buildscript classpath
// what i want
// buildscript { classpath 'com.oracle:ojdbc6:11.2.0.2.0' }
configurations {
gradleRuntime {transitive = false}
}
dependencies {
@rundis
rundis / gist:d2213fa2e3df98196e47
Created January 16, 2015 08:54
Gradle SSH Env Example
buildscript {
repositories { jcenter() }
dependencies { classpath 'org.hidetake:gradle-ssh-plugin:0.1.7' }
}
apply plugin: 'ssh'
remotes {
test {
host = '192.168.255.1'
@rundis
rundis / gist:2bd8954059af6bb8175a
Last active August 29, 2015 14:17
nrepl find symbol extra space ?
;given store.clj with a function like
(defn find-user-by-id3 [conn id]
(when-let [user
(first
(jdbc/query conn ["select * from user where id = ?" id]))]
(assoc user :user-roles (find-user-roles conn (:id user)))))
; and a service.clj with a usage like
(defn refresh-auth-token [ds auth-conf refresh-token]
(if-let [unsigned (unsign-token auth-conf refresh-token)]
@rundis
rundis / gist:b035bfd058b419f782e5
Last active August 29, 2015 14:18
Find unbound weirdness
(ns acme-auth.store
(:require [clojure.java.jdbc :as jdbc]))
(defn- find-user-roles [conn user-id]
(let [id (jdbc/query conn "select sysdate from dual")]
(map (fn [row] {:role-id (:id row) :application-id (:application_id row)})
(jdbc/query conn ["select r.id, r.application_id
from role r
inner join user_role ur on r.id = ur.role_id
where ur.user_id = ?" user-id]))))
@rundis
rundis / gist:521420edd12027bf4d6d
Created April 11, 2015 23:05
refactor-nrepl: find-unbound weird results
(ns acme-auth.store
(:require [clojure.java.jdbc :as jdbc]))
(defn add-user! [ds user]
(jdbc/with-db-transaction [conn ds]
(let [res (jdbc/insert! conn
:user
{:username (:username user) :password (:password user)})
user-id ((keyword "scope_identity()") (first res))]
@rundis
rundis / gist:77237558ca31aa5af5bf
Created April 23, 2015 10:23
Failed sexpr finder
(ns parser
(:require [clojure.tools.reader :as reader]
[clojure.tools.reader.reader-types :as rt]
[clojure.zip :as zip]))
(defn try-read [rdr]
(when rdr
(reader/read rdr false ::EOF)))
@rundis
rundis / gist:145cfdaf6ea277c9647b
Created June 8, 2015 08:25
FixedDataTable with cellRenderer throws when using dev version of react
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://rawgit.com/facebook/fixed-data-table/5e72a326c16b667ec6f38cb47147c74daeaaf956/dist/fixed-data-table.css">
</head>
<div id="content"></div>
<body>
<!-- The none minified version of react throws:
@rundis
rundis / gist:15e0fffafcfc0c756c09
Created June 30, 2015 08:27
fixed-data-table meets boostrap dropdown button for css showdown
<div class="public_fixedDataTable_main"> <!-- positioned relative -->
<div class="fixedDataTable_rowsContainer"> <!-- positioned relative -->
<div style="position:absolute;transform:translate3d(0px,50px,0);backface-visibility:hidden;">
<div style="width:600px;height:50px;z-index:0;transform:translate3d(0px,0px,0);backface-visibility:hidden;" class="fixedDataTableRow_rowWrapper"> <!-- positioned absolute -->
<div class="public_fixedDataTableRow_main public_fixedDataTable_bodyRow" style="width:600px;height:50px;"> <!-- positioned absolute -->
<div class="fixedDataTableRow_body"> <!-- positioned absolute -->
<div style="height:50px;" class="fixedDataTableCellGroup_cellGroupWrapper">
<div class="fixedDataTableCellGroup_cellGroup" style="height:50px;position:absolute;width:0;z-index:2;transform:translate3d(0px,0px,0);backface-visibility:hidden;">
</div>
</div>
@rundis
rundis / user.behaviors
Created December 29, 2015 22:26
Reload Namespace in Light Table
; add this to hook up your custom behavior
[:editor.clojure :lt.plugins.user/reload-ns]
@rundis
rundis / gist:0472fc0537b3d81bb6e5
Last active January 22, 2016 00:41
Light Table version 0.8.1
Hi All !
In an effort to try and release more frequently we are happy to to announce version 0.8.1 just over a month after the 0.8.0 milestone release.
Gabriel and Kenny has done a monumental effort in cleaning up the issues list. We're down to under a 100 ! Many of which are obsolete and some are closed
because we haven't heard back from the OP. Plugin specific issues have been moved to the issue tracker in their respective github repo.
It's worth keeping in mind when filing issues in the future, that if you know (or have a fair hunch) that an issue is related to a particular
Light Table plugin, please consider filing the issue in the issue tracker for that projects repo.
But of course it's not just issue pruning that has been going on. There has been several bugfixes and feature enhancements happening as well. We've also received a few pull requests that have been accepted or partially accepted as well. Big thanks to our contributors !