sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice
#!/bin/bash
# Need to do this because symlink won't work
SetTitleMatchMode, 2 | |
#IfWinActive Zim ahk_class gdkWindowToplevel | |
!1:: | |
SendInput, {AppsKey}e{Tab}{Tab}{Tab}{Tab}100{Enter}{Enter} | |
return | |
!2:: | |
SendInput, {AppsKey}e{Tab}{Tab}{Tab}{Tab}200{Enter}{Enter} | |
return | |
!3:: |
import ipdb | |
import numpy as np | |
import numpy.linalg as nl | |
import matplotlib.pyplot as plt | |
from scipy.spatial.distance import pdist, cdist, squareform | |
def makeT(cp): | |
# cp: [K x 2] control points | |
# T: [(K+3) x (K+3)] | |
K = cp.shape[0] |
#!/usr/bin/env bash | |
# | |
# Open new iTerm window from the command line using v3 syntax for applescript as needed in iTerm2 Version 3+ | |
# This script blocks until the cmd is executed in the new iTerm2 window. It then leaves the window open. | |
# TODO Add option to close iTerm2 after cmd execs | |
# See also https://www.iterm2.com/documentation-scripting.html | |
# | |
# Usage: |
# -*- coding: utf-8 -*- | |
""" | |
Plot the convex hull around a set of points as a | |
shaded polygon. | |
@author: Nicolas Guarin Zapata | |
@date: October 15, 2014 | |
""" | |
import numpy as np | |
from scipy.spatial import ConvexHull |
#!/usr/bin/env bash | |
# checks if branch has something pending | |
function parse_git_dirty() { | |
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*" | |
} | |
# gets the current git branch | |
function parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" |
I use PlantUML a lot. It's what I use for drawing all sorts of diagrams and it's handy because of its easy markup (once you get used to it) while making things easy to maintain as projects grow (thanks to version control)
This gist explains how I do my PlantUML workspace in a project.
globals
directory for all diagrams to follow (like the "stylesheet" below) to keep things consistent.stylesheet.iuml
file that keeps the use of colors consistent through use of basic FOREGROUND, BACKGROUND and ACCENT colors.style-presets.iuml
file defines these colors so you can make "presets" or "themes" out of them.stylesheet.iuml
, you'll need the Roboto Condensed and Inconsolata fonts for these to work properly.example-sequence.puml
for example: https://imgur.com/Klk3w2Fimport time | |
import multiprocessing as mp | |
import numpy as np | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
(* | |
Export All Safari Tabs in All Open Windows to a Markdown File | |
July 13, 2015 | |
// SCRIPT PAGE | |
http://hegde.me/urlsafari | |
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT | |
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file |