Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gtrak on github.
  • I am gtrak (https://keybase.io/gtrak) on keybase.
  • I have a public key ASD9Y8nFoqgxhXrlFDg8RTtSXgT2p2z0WuWZQZNx9hvRqgo

To claim this, I am signing this object:

@gtrak
gtrak / sql-sucks-less.el
Last active January 30, 2018 17:10
sql-sucks-less.el
(defun sql-switch-sqli-buffer ()
(interactive)
(unless (and sql-buffer (buffer-live-p (get-buffer sql-buffer))
(get-buffer-process sql-buffer))
(sql-set-sqli-buffer))
(setq last-sql-buffer (current-buffer))
(pop-to-buffer sql-buffer))
(defun sqli-switch-sql-buffer ()
(interactive)
gary@gary-macbook:~/dev$ lein new expo expotest
Retrieving expo/lein-template/0.17.1/lein-template-0.17.1.pom from clojars
Retrieving expo/lein-template/0.17.1/lein-template-0.17.1.jar from clojars
Generating fresh Expo project.
README.md contains instructions to get you started.
If you have any questions, you can ask us on Expo slack #clojurescript channel. https://slack.expo.io/
gary@gary-macbook:~/dev$ cd expotest/
gary@gary-macbook:~/dev/expotest$ cat project.clj
(defproject expotest "0.1.0-SNAPSHOT"
:description "FIXME: write description"
@gtrak
gtrak / derefmap.clj
Created March 8, 2017 00:30
derefmap
;; I need this often enough, a lightweight introspectable fn+data
;; container with a default operation - GT
(defrecord _DerefMap [deref-fn]
clojure.lang.IDeref
(deref [me] (deref-fn me)))
(prefer-method print-method clojure.lang.IRecord clojure.lang.IDeref)
(prefer-method clojure.pprint/simple-dispatch clojure.lang.IRecord clojure.lang.IDeref)
(prefer-method clojure.pprint/simple-dispatch clojure.lang.IPersistentMap clojure.lang.IDeref)
Traditional latkes (pareve)
This recipe is from one of my favorite cookbooks, “Jewish Cooking in America,” by Joan Nathan. These are thin “pancakes” with no flour or matzo meal.
2 pounds russet (baking) or Yukon Gold potatoes
1 medium onion
1-1/2 cups chopped scallions, including the green part
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
# Update interval in seconds
update_interval 0.5
# This is the number of times Conky will update before quitting.
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#!/bin/sh
# dock="alsa_output.usb-C-Media_Electronics_Inc._ThinkPad_OneLink_Dock_USB_Audio-00.analog-stereo"
# sink="$dock"
sink=$(pacmd list-sinks |grep "name:" |sed 's/name: <\(.*\)>$/\1/' | xargs echo | head)
pacmd load-module module-ladspa-sink sink_name=crossfeed master="$sink" plugin=bs2b label=bs2b control=700,4.5
gary@gary-dell:~/dev/personal/test-1.8$ lein repl
nREPL server started on port 43021 on host 127.0.0.1 - nrepl://127.0.0.1:43021
REPL-y 0.3.5, nREPL 0.2.10
Clojure 1.8.0-RC2
OpenJDK 64-Bit Server VM 1.8.0_66-internal-b17
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)