This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Import additional configuration files | |
# | |
# Imports are loaded in order, skipping all missing files, with the importing | |
# file being loaded last. If a field is already present in a previous import, it | |
# will be replaced. | |
# | |
# All imports must either be absolute paths starting with `/`, or paths relative | |
# to the user's home directory starting with `~/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Import additional configuration files | |
# | |
# Imports are loaded in order, skipping all missing files, with the importing | |
# file being loaded last. If a field is already present in a previous import, it | |
# will be replaced. | |
# | |
# All imports must either be absolute paths starting with `/`, or paths relative | |
# to the user's home directory starting with `~/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
call plug#begin() | |
Plug 'tpope/vim-sensible' | |
Plug 'vim-scripts/tir_black' | |
Plug 'rust-lang/rust.vim' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osascript -ss -e 'tell application "iTunes" to {|artists|: artist, |albums|: album, |tracks|: name, |added|: date added} of tracks of library playlist 1' | sed 's/[[:<:]]date[[:>:]]//g' | sed "s/:{/:[/g" | sed "s/}}/]}/g" | sed "s/},/],/g" | sed "s/artists:/\"artists\":/g" | sed "s/albums:/\"albums\":/g" | sed "s/tracks:/\"tracks\":/g" | sed "s/added:/\"added\":/g" | python -c 'from __future__ import print_function; import sys, json; reload(sys); sys.setdefaultencoding("utf-8"); x = json.load(sys.stdin); map(lambda t: print(t[0] + "\t" + t[1] + "\t" + t[2] + "\t" + t[3]), zip(x["artists"], x["albums"], x["tracks"], x["added"]))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Monads! >>= >> return | |
import Foundation | |
infix operator >>= { associativity left } | |
func >>=<A,B> (left: Optional<A>, right: A -> Optional<B>) -> Optional<B> { | |
if left == nil { | |
return nil | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns backrack.bloom | |
(:import [java.lang Math]) | |
(:use [digest :only [sha-256]])) | |
(deftype Bloom [m k f] | |
Object | |
(equals [this b2] | |
(and (= (.m this) (.m b2)) (= (.k this) (.k b2)) (= (.f this) (.f b2)))) | |
(toString [this] | |
(str "m: " (.m this) " k: " (.k this)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch to ctl-a | |
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key a send-prefix | |
# fix copy paste | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
# reload config key |
NewerOlder