Skip to content

Instantly share code, notes, and snippets.

@larromba
larromba / config.fish
Last active January 10, 2017 10:45 — forked from alyssaq/config.fish
config.fish set environment variables from bash_profile
set -g -x fish_greeting ''
function fish_prompt
importProfile ~/.bashrc
set_color $fish_color_cwd
echo -n (prompt_pwd)
echo -n (git-radar --fish --fetch)
set_color normal
echo -n ' > '
end
@larromba
larromba / .swiftlint.yml
Created October 16, 2018 08:29 — forked from candostdagdeviren/.swiftlint.yml
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma
@larromba
larromba / passgitgpg.md
Created March 2, 2021 19:39 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@larromba
larromba / Levenshtein.swift
Created March 2, 2021 19:39 — forked from RuiNelson/Levenshtein.swift
Levenshtein distance between two String for Swift 4.x
import Foundation
extension String {
subscript(index: Int) -> Character {
return self[self.index(self.startIndex, offsetBy: index)]
}
}
extension String {
public func levenshtein(_ other: String) -> Int {
@larromba
larromba / appify
Created September 22, 2021 14:27 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh