Skip to content

Instantly share code, notes, and snippets.

View .spacemacs
; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
View install-java.sh
#!/bin/bash
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo bash -c "echo JAVA_HOME="/usr/lib/jvm/java-8-oracle" >> /etc/environment"
java -version
@jgrodziski
jgrodziski / postgres.clj
Last active Jan 16, 2018
Hugsql automatic renaming keys from "snake" to "kebab" using postgres.async and core.async channels
View postgres.clj
(def xform (map (partial transform-keys ->kebab-case-keyword)))
(defn result-one-snake->kebab
[this result options]
(let [return-chan (chan)]
(pipeline 1 return-chan xform (result-one this result options))
return-chan))
(defmethod hugsql.core/hugsql-result-fn :1 [sym] 'org.myapp.db.postgres/result-one-snake->kebab)
(defmethod hugsql.parameters/apply-hugsql-param :i [param data options] 'org.myapp.db.postgres/result-one-snake->kebab)
View keybase.md

Keybase proof

I hereby claim:

  • I am jgrodziski on github.
  • I am jgrodziski (https://keybase.io/jgrodziski) on keybase.
  • I have a public key whose fingerprint is 5A99 EE65 A0A4 7587 5EB1 EC89 C915 208B FDD0 637E

To claim this, I am signing this object:

@jgrodziski
jgrodziski / settings.xml
Created Sep 10, 2017
maven settings.xml including clojars repo
View settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
View install-zsh.sh
#!/bin/bash
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sudo chsh -s /bin/zsh
curl https://gist.githubusercontent.com/jgrodziski/7405347/raw/f9bf15d5e2779417985d9137c3f5cb932b4858fb/jerem.zsh-theme -o ~/.oh-my-zsh/themes/jerem.zsh-theme
# then change these two lines in .zshrc
# ZSH_THEME="jerem"
# plugins=(git docker osx sublime mvn ssh-agent lein brew dircycle history jump z autojump zsh-syntax-highlighting)
View install-java.sh
#!/bin/bash
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo bash -c "echo JAVA_HOME="/usr/lib/jvm/java-8-oracle" >> /etc/environment"
java -version
@jgrodziski
jgrodziski / docker-aliases.sh
Last active Feb 20, 2019
Useful Docker Aliases
View docker-aliases.sh
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
View keybase.md

Keybase proof

I hereby claim:

  • I am jgrodziski on github.
  • I am jgrodziski (https://keybase.io/jgrodziski) on keybase.
  • I have a public key whose fingerprint is D629 2B73 5ADE 9129 D6BE BB5B 3513 46D6 EDFE 6C3B

To claim this, I am signing this object:

@jgrodziski
jgrodziski / encrypt-folder
Created Dec 25, 2013
encrypt a folder to an image
View encrypt-folder
echo -n "password" | hdiutil create -encryption -stdinpass -srcfolder GYB-GMail-Backup-jeremie@grodziski.com encrypted.dmg
You can’t perform that action at this time.