Skip to content

Instantly share code, notes, and snippets.

@jclosure
jclosure / system-wide-clipboard.zsh
Created July 31, 2019 06:43 — forked from welldan97/system-wide-clipboard.zsh
Zsh copy & paste system wide for OS X, like in emacs
pb-kill-line () {
zle kill-line
echo -n $CUTBUFFER | pbcopy
}
pb-kill-whole-line () {
zle kill-whole-line
echo -n $CUTBUFFER | pbcopy
}
@jclosure
jclosure / terminals.txt
Created August 2, 2019 02:54 — forked from KevinGoodsell/terminals.txt
The Trouble With Terminals
The Trouble With Terminals
Thu, 16 Dec 2010 16:43:20 -0800
Copyright 2010 Kevin Goodsell
0. License
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a
@jclosure
jclosure / monad.py
Created September 25, 2019 05:56 — forked from unthingable/monad.py
from abc import abstractmethod
from itertools import chain, imap
from typing import Any, Iterable
from typing import Callable, Generic, List
from typing import TypeVar
A = TypeVar('A')
B = TypeVar('B')
C = TypeVar('C')
@jclosure
jclosure / tmux_build_from_source_ubuntu.sh
Last active November 13, 2019 23:15 — forked from indrayam/tmux_build_from_source_ubuntu.sh
Install latest version of tmux in Ubuntu 16.04
# Steps to build and install tmux from source on Ubuntu.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.9a
sudo apt-get -y remove tmux
sudo apt-get -y install wget tar libevent-dev libncurses-dev
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@jclosure
jclosure / gist:fc4f4030bc219aa07e2620a7417a2e83
Created December 31, 2019 05:33 — forked from javierarce/gist:7886957
Degrees, minutes and seconds to decimal degrees
CREATE OR REPLACE FUNCTION DMS2DD(strDegMinSec varchar)
RETURNS numeric
AS
$$
DECLARE
i numeric;
intDmsLen numeric; -- Length of original string
strCompassPoint Char(1);
strNorm varchar(16) = ''; -- Will contain normalized string
strDegMinSecB varchar(100);
@jclosure
jclosure / concave_hulls.ipynb
Created January 27, 2020 00:11 — forked from dwyerk/concave_hulls.ipynb
concave hulls using shapely and scipy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jclosure
jclosure / migrations_in_console_cheatsheet.exs
Created May 4, 2020 15:56 — forked from pmarreck/migrations_in_console_cheatsheet.exs
How to run Ecto migrations in Elixir/Phoenix from an `iex -S mix` or production console
# How to run Ecto migrations from IEx console... Examples
# preliminaries assumed in the following code, change to fit your environment:
alias YourAppName.Repo
your_app_name_as_atom = :mpnetwork
downto_version = 20170724182558
# Down:
Ecto.Migrator.run(Repo, "priv/repo/migrations/", :down, [to: downto_version])
@jclosure
jclosure / init.el
Created September 21, 2020 05:16 — forked from tonini/init.el
Minimal setup for alchemist and company init.el
;; ELPA setup
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(package-initialize)
;; Company setup
* root topic - TAB and S-TAB to toggle folding
** child topic
child topic text
*** leaf topic:
some text blah
blah
blah
*** another leaf topic:
# test table - TAB to cycle through columns, M-e to move point to end of cell
@jclosure
jclosure / global-gitignore.md
Created April 3, 2021 08:18 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore