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
blueprint: | |
name: One-Time Scheduled Toggle | |
description: Turn something on or off at a scheduled time. | |
domain: automation | |
input: | |
what: | |
name: Action to do | |
description: On or off? | |
selector: | |
boolean: |
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
function RandStr(len) | |
py3 << EOF | |
import vim, random | |
rstr = ''.join([chr(random.randint(65,123)) for i in range(int(vim.eval('a:len')))]) | |
vim.command(f"return '{rstr}'") | |
EOF | |
endfunction | |
function TimeStridx(numiter, candidates) |
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
tell application "Keynote" | |
set curslide to the front document's current slide | |
repeat with img in the images of curslide | |
-- iWork rotation is, irritatingly, an integer | |
set the rotation of img to random number from -5 to 5 | |
end repeat | |
end tell |
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
//Make batch changes to selected items in Zotero. Paste this into Tools -> Developer -> Run JavaScript. | |
async function batch_edit(field, value) | |
{ | |
var zp = Zotero.getActiveZoteroPane(); //Active Zotero window | |
var selected = zp.getSelectedItems(); //Get the items that are selected | |
for(const item of selected) | |
{ | |
item.setField(field, value); | |
await item.saveTx(); | |
} |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
This script takes as input a BibTeX library exported from readcube/mekentosj Papers3 and outputs a BibTex library for Zotero to import. | |
The script preserves your Papers citekeys, adds supplementary files from the Papers3 Library, removes duplicate links to PDFs and removes extraneous *.html and *.webarchive files that are often created by importing articles into Paper from a web browser. | |
__Instructions for use__: | |
* Make sure to have Better BibTeX pre-installed to Zotero if you want to preserve the Papers citekeys. |
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
"""Code to output gCode to drill holes. Drills breadth first to allow | |
cooling time for e.g. acrylic.""" | |
import numpy as np | |
from mecode import G | |
def gen_holes(nx:int, ny:int, spacing:float, x0:float, y0:float, | |
depth:float, outfile, *, depth_step=1.0, feedrate=150.0, | |
z_clearance=4.0, start_depth=0.0, view=False): | |
"""Generate gCode to drill a matrix of holes, going breadth-first |
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
"""Perform enhanced autocorrelation on a wave file. | |
Based very loosely on https://bitbucket.org/yeisoneng/python-eac | |
which is based on Audacity's implementation. This version uses | |
Numpy features to significantly speed up processing.""" | |
from __future__ import division | |
import numpy as np | |
from numpy.fft.fftpack import fft, rfft | |
from scipy.interpolate import interp1d | |
from scipy.signal import argrelextrema |
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 python | |
import Papers | |
import trello | |
proxy_strip = 'PROXY_STRIP_HERE' #This prefix will be stripped from the URL that comes from Papers | |
api_key = 'YOUR_TRELLO_API_KEY_HERE' | |
token = 'YOUR_TRELLO_TOKEN_HERE' | |
org_name = 'YOUR_TRELLO_ORG_NAME_HERE' #Or use "me" if you don't have a Trello org | |
board_name = 'DEFAULT_BOARD_NAME_HERE' |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="node_modules/jquery/dist/jquery.min.js"></script> | |
<script src="paperjs-v0.9.23/dist/paper-full.js"></script> | |
<script type="text/paperscript" canvas="paper"> | |
var $ = window.$; | |
//Fill in the background | |
var background = new Shape.Rectangle(view.bounds); |
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
// ==UserScript== | |
// @name Trello days left | |
// @namespace edu.rit.ashbrook.daniel | |
// @include https://trello.com/* | |
// @version 1.1 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @grant GM_addStyle | |
// @description Add the number of days left until an item is due to each applicable card. | |
// ==/UserScript== |
NewerOlder