This file contains hidden or 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
| # usage: | |
| # $ python3 ltc.py "America/Chicago" "8/27/2020 15:00" | |
| # 01PM MST | |
| # 01PM PDT | |
| # ... | |
| # 04:00 AWST | |
| # 04:45 +0845 | |
| # ... | |
| import pytz, datetime, argparse |
This file contains hidden or 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
| ztable = { zsort = {} } | |
| local function zcomp(a, b) | |
| if type(a) == 'table' and type(b) == 'table' and a.z and b.z then | |
| return a.z > b.z | |
| else return false end | |
| end | |
| local function format(t, k, v) | |
| if type(v) == "table" then |
This file contains hidden or 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
| -- param test test | |
| cs = require 'controlspec' | |
| px = 48 | |
| py = 16 | |
| function init() | |
| params:add{ type='binary', id='tog', behavior='toggle', action=function(v) print('tog: ' .. tostring(v)) end } | |
| params:add{ type='binary', id='mom', behavior='momentary', action=function(v) print('mom: ' .. tostring(v)) end } |
This file contains hidden or 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
| " Vim syntax support file | |
| " Maintainer: Bram Moolenaar <Bram@vim.org> | |
| " Last Change: 2001 Sep 12 | |
| " This file sets up the default methods for highlighting. | |
| " It is loaded from "synload.vim" and from Vim for ":syntax reset". | |
| " Also used from init_highlight(). | |
| if !exists("syntax_cmd") || syntax_cmd == "on" | |
| " ":syntax on" works like in Vim 5.7: set colors but keep links |
This file contains hidden or 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
| local function txtbox(txt, x, y, x2, y2, xalign, yalign, font, size, lvl, border, fill, padding, font_headroom, font_leftroom) | |
| font_headroom = font_headroom or 3/8 | |
| font_leftroom = font_leftroom or 1/16 | |
| screen.font_face(font) | |
| screen.font_size(size) | |
| local fixed = (x2 ~= nil) and (y2 ~= nil) | |
| local width = screen.text_extents(txt) | |
| local height = size * (1 - font_headroom) |
This file contains hidden or 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
| #!/bin/bash | |
| # This script takes a remote repository and merges it into | |
| # the current one as a subdirectory | |
| set -e | |
| if [ -z "$1" ] | |
| then | |
| echo "Usage:" |
This file contains hidden or 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
| local root, et = 440, 12 | |
| local tonics = { | |
| ['D#'] = -6, | |
| ['C#'] = -8, | |
| ['A'] = 0, | |
| ['A#'] = 1, | |
| ['G'] = -2, | |
| ['B'] = 2, | |
| ['G#'] = -1, |
This file contains hidden or 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
| ( | |
| ServerOptions.devices; | |
| s.options.device = "UMC404HD 192k"; | |
| s.boot; | |
| ) | |
| ( | |
| ~cc = Bus.control(s, 7); | |
| MIDIIn.connectAll; |
This file contains hidden or 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
| include 'nest_/lib/nest/core' | |
| include 'nest_/lib/nest/norns' | |
| include 'nest_/lib/nest/grid' | |
| n = nest_ { | |
| range = _grid.range { | |
| x = { 1, 16 }, | |
| z = -1, --range shows up below tog | |
| lvl = 4 | |
| }, |
This file contains hidden or 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
| include 'nest_/lib/nest/core' | |
| include 'nest_/lib/nest/norns' | |
| include 'nest_/lib/nest/grid' | |
| n = nest_ { | |
| num = _grid.number { | |
| x = { 2, 14 }, y = 2, | |
| wrap = 5, --wrap to the next line after 5 keys | |
| level = { 4, 15 }, | |
| action = function(s, v) print(v) end --v is still range 1 - 13 |
OlderNewer