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
# name: Classic + Vcs (custom) | |
# author: Lily Ballard & Lionello Lunesu | |
function fish_prompt --description 'Write out the prompt' | |
set -l last_pipestatus $pipestatus | |
set -l normal (set_color normal) | |
# Color the prompt differently when we're root | |
set -l color_cwd $fish_color_cwd | |
set -l prefix |
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
#!/bin/bash | |
# | |
# Cache nix-shell environment | |
# | |
# - watches shell.nix (or default.nix), ~/.direnvrc and .envrc | |
# - based on https://github.com/direnv/direnv/wiki/Nix | |
# | |
use_nix() { | |
local shell_file=$(test -f shell.nix && echo shell.nix || echo default.nix) | |
if [[ ! -f "$shell_file" ]]; then return; fi |
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
#!/bin/bash | |
# | |
# Cache nix-shell environment | |
# | |
# - watches shell.nix (or default.nix), ~/.direnvrc and .envrc | |
# - based on https://github.com/direnv/direnv/wiki/Nix | |
# | |
use_nix() { | |
local shell_file=$(test -f shell.nix && echo shell.nix || echo default.nix) | |
if [[ ! -f "$shell_file" ]]; then return; fi |
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
{ | |
"telemetry.enableTelemetry": false, | |
"window.openFilesInNewWindow": "off", | |
"go.useLanguageServer": true, | |
"terminal.integrated.shell.windows": "/Users/llunesu/.nix-profile/bin/fish", | |
"workbench.colorTheme": "Dark (Monokai)", | |
"editor.rulers": [ | |
0, 80, 120 | |
], | |
"files.trimTrailingWhitespace": true, |
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
# Avoid default fish path abbreviation | |
set -g -x fish_prompt_pwd_dir_length 0 | |
# Use vim as default editor in fish | |
set -g -x EDITOR vim | |
# Force language of CLI tools to English (US) | |
set -g -x LANG en_US.UTF-8 | |
#status --is-interactive; and source (rbenv init -|psub) |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" Set the runtime path to include Vundle and initialize | |
"set rtp+=~/.vim/bundle/Vundle.vim | |
"call vundle#begin() | |
"Plugin 'VundleVim/Vundle.vim' | |
"Plugin 'Valloric/YouCompleteMe' | |
" All of your Plugins must be added before the following line | |
"call vundle#end() " required |
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
<keymap version="1" name="Visual Studio copy" parent="Visual Studio"> | |
<action id="$Copy"> | |
<keyboard-shortcut first-keystroke="ctrl c" /> | |
<keyboard-shortcut first-keystroke="meta c" /> | |
</action> | |
<action id="$Cut"> | |
<keyboard-shortcut first-keystroke="ctrl x" /> | |
<keyboard-shortcut first-keystroke="shift delete" /> | |
<keyboard-shortcut first-keystroke="meta x" /> | |
</action> |
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
#!/usr/bin/env python3 | |
import itertools | |
import sys | |
import re | |
import os | |
from collections import defaultdict | |
MODULE = re.compile(r'^(END )?MODULE\s+([A-Z0-9_]+)', re.IGNORECASE) | |
USE = re.compile(r'^USE\s+([A-Z0-9_]+)(\s*,\s*ONLY\s*:\s*([A-Z0-9_,]+))?', re.IGNORECASE) | |
BEGIN = re.compile(r'^(SUBROUTINE|PROGRAM|((COMPLEX|LOGICAL|INTEGER|REAL|CHARACTER)(\([^)]+\))? )?FUNCTION)\s+([A-Z0-9_]+)', re.IGNORECASE) |
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 [ "$(uname -s)" != "Linux" ] && [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
source ~/.profile | |
PATH=/usr/local/sbin:$PATH | |
function __smile() { if [ $? -ne 0 ]; then echo ":("; else echo ":)"; fi } | |
GIT_PS1_SHOWDIRTYSTATE=true | |
PS1="\n\$(__smile)\[\e[1m\]\w\[\e[0m\]\$(__git_ps1)\n\$ " |
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
/** | |
* Wrap an Express middleware or handler for async support. | |
* @param {function} fn The middleware or handler to wrap | |
* @returns {function} Wrapped function | |
*/ | |
exports.wrap = function(fn) { | |
if (fn.length === 4) { | |
// Wrap error handler | |
return (err, req, res, next) => { | |
const r = fn(err, req, res, next) |