Skip to content

Instantly share code, notes, and snippets.

View captainju's full-sized avatar

Julien Blondeau captainju

View GitHub Profile
@tpolecat
tpolecat / citext.md
Created January 9, 2018 07:53
Meta for citext Postgres type.

Ok, so to map CITEXT, which is not a standard type JDBC knows about, we need a wrapper class and need to move the value back and forth via the generic PGobject data type.

import org.postgresql.util.PGobject

case class CIText(s: String)

object CIText {
 

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@cmlsharp
cmlsharp / !!
Last active November 26, 2019 11:57
Repeat most recent command in fish
# Add this to your ~/.config/fish/config.fish
# Syntax:
# To just rerun your last command, simply type '!!'
# '!! sudo' will prepend sudo to your most recent command
# Running !! with anything other than sudo will append the argument to your most recent command
# To add another command to prepend list remove the # on line 10 and put the command in the quotes. Repeat as needed
function !!;
set prevcmd (history | head -n 1)
if test "$argv"
if test "$argv" = "sudo" #; or "any other command you want to prepend"
@rsff
rsff / ssh_agent_start.fish
Last active March 14, 2019 08:56 — forked from schaary/ssh_agent_start.fish
ssh agent for fish
#this script can never fail
#i use it in the fish_config
#call it with start_agent
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
if [ -n "$SSH_AGENT_PID" ]
ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.