git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
from itertools import chain | |
def parse_range(rng): | |
parts = rng.split('-') | |
if 1 > len(parts) > 2: | |
raise ValueError("Bad range: '%s'" % (rng,)) | |
parts = [int(i) for i in parts] | |
start = parts[0] | |
end = start if len(parts) == 1 else parts[1] | |
if start > end: |
#!/bin/bash | |
# Might as well ask for password up-front, right? | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Example: do stuff over the next 30+ mins that requires sudo here or there. | |
function wait() { |
Usage
osascript Start.applescript "objective" "tag1,tag2"
osascript Stop.applescript
I have skipped most Vitamin-R workflows. See the attached settings snapshot. If you have them enabled, you need to update the script to handle different steps.
I use the scripts in my org pomodoro script
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
#!/usr/bin/env python | |
import argparse, sys, markdown | |
TEMPLATE = """<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="referrer" content="no-referrer" /> | |
<meta name="referrer" content="unsafe-url" /> |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
local ffi = require"ffi" | |
ffi.cdef[[ | |
// Cairo types | |
typedef struct _cairo_surface cairo_surface_t; | |
typedef int cairo_status_t; | |
typedef struct _cairo cairo_t; | |
// Poppler types | |
typedef struct _PopplerPage PopplerPage; |