Skip to content

Instantly share code, notes, and snippets.

{:user {:plugins [[cider/cider-nrepl "0.13.0"]
[lein-ring "0.9.7" :exclusions [org.clojure/clojure]]
[lein-pprint "1.1.1"]
[lein-vanity "0.2.0" :exclusions [org.clojure/clojure]]
[lein-voom "0.1.0-20160311_203101-g259fbfc" :exclusions [org.clojure/clojure]]
[com.jakemccrary/lein-test-refresh "0.16.0"]
[com.palletops/lein-shorthand "0.4.0" :exclusions [org.clojure/clojure]]]
:dependencies []
:repl-options {}
:shorthand {. {pp clojure.pprint/pprint}}}

Keybase proof

I hereby claim:

  • I am rosado on github.
  • I am rosado (https://keybase.io/rosado) on keybase.
  • I have a public key whose fingerprint is 70E6 0F2B D879 CA54 2276 AD93 9132 23FC 95B2 52C3

To claim this, I am signing this object:

@rosado
rosado / database.cmd
Created December 9, 2014 20:05
after installing postgres on windows from a zip file, this can be handy
@echo off
if "%1" == init (
bin\initdb -U postgres -A password -E utf8 -W -D data
)
if "%1" == "start" (
"bin\pg_ctl" -D "data" -l log\pgsql.log start
)
if "%1" == "stop" (
"bin\pg_ctl" -D "data" -l log\pgsql.log stop
@rosado
rosado / install-sources
Created January 19, 2015 14:12
install sources for current maven project
mvn dependency:sources -Dmaven.test.skip=true
@rosado
rosado / install-java8.sh
Created March 11, 2015 13:33
install-java8-on-xubuntu
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@rosado
rosado / .gitconfig
Created March 16, 2015 23:29
git aliases
[alias]
st = status
mlog = log --oneline --author=szabla
log1 = log --oneline
diffstat = diff --stat -r
br = branch
gwc = whatchanged -p --abbrev-commit --pretty=medium
@rosado
rosado / Channels (almost like in Newsqueak).md
Created July 27, 2015 18:30
Channels (almost like in Newsqueak) again

(published May 24, 2010, blog no longer exists)

Years ago I saw a really good talk by Rob Pike about a little known language called Newsqueak. I can’t remember if I had anything more than a mild interest in concurrent programming, but that talk got my attention. I read all I could find about concurrency in Newsqueak. Fun ideas are fun to play with.

I wrote a short article about channels, which are Newsqueak’s construct for synchronization between threads. I tried to emulate behavior of channels in C# via locking and signaling. I was aware that there probably is no 1:1 mapping between what Newsqueak calls processes and managed threads in .NET (though I’m not sure to this day how many processes could Newsqueak spawn before bringing machine to a halt) but the exercise was fun enough to do it anyway.

Now, this was long enough ago, that C# didn’t have syntax for lambdas and was

@rosado
rosado / jvm options
Created October 21, 2015 12:05
JVM opts from clojure-users group
;; https://groups.google.com/forum/#!topic/clojure/JgxFQLP2E34
:jvm-opts ^:replace ["-server"
;;"-XX:+AggressiveOpts"
;;"-XX:+UseFastAccessorMethods"
;;"-XX:+UseCompressedOops"
"-Xmx4g"]
@rosado
rosado / gist:12ef6afad830236b7330
Created December 4, 2015 10:05
Sublime Text bindings for Home/End on Mac OS X
[
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": { "to": "eol", "extend": true } },
{ "keys": ["shift+home"], "command": "move_to", "args": { "to": "bol", "extend": true } }
]
@rosado
rosado / Makefile
Last active February 2, 2022 00:41
test if directory exists in a makefile
all: txtfile
TARGET_DIR = target-dir
txtfile: $(TARGET_DIR)
touch $(TARGET_DIR)/file.txt
target-dir:
test ! -d $(TARGET_DIR) && mkdir $(TARGET_DIR)