Skip to content

Instantly share code, notes, and snippets.

groovenectar / clave.tidal
Last active Apr 22, 2022
Attempting a clave pattern in TidalCycles
View clave.tidal
-- Rough start - needs more fine-tuning
d1 $ sound "[gretsch:6 ~ gretsch:6 ~ gretsch:6] [~ gretsch:6 gretsch:6 ~]"
d2 $ sound "gretsch:6 ~ ~ gretsch:6 ~ ~ gretsch:6 ~ ~ ~ gretsch:6 ~ gretsch:6 ~ ~ ~"
groovenectar / knockout-js-datetime-input.js
Last active Aug 20, 2021
A KnockoutJS component to create date/time inputs that work together to update a single observable value. This value gets passed in as a parameter, `datetimeObservable`. This value is updated in realtime on every keypress.
View knockout-js-datetime-input.js
// Usage: <datetime params="id: 'any-unique-id', datetimeObservable: observableDateTimeObjectFromParentViewModel, default: defaultDateObject, min: new Date(), max: maxDateObject"></datetime>
ko.components.register('datetime', {
viewModel: function(params) {
this.dateid = + '-date';
this.timeid = + '-time'; = '';
this.time = '';
this.datetimeObservable = params.datetimeObservable;
groovenectar / knockoutjs-date-binding.js
Created Jun 3, 2021
Date Binding for Knoockout JS
View knockoutjs-date-binding.js = {
update: function(element, valueAccessor) {
// First get the latest data that we're bound to
let data = valueAccessor();
// Next, whether or not the supplied model property is observable, get its current value
let value = ko.unwrap(data);
let prop = element.nodeName === 'INPUT' ? 'value' : 'innerText';
if (value instanceof Date) {
if (element.type === 'date') {
View US Zip Codes from 2016 Census Data
groovenectar / OpenWithSublimeText3.bat
Last active Mar 1, 2017 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=D:\Programs\Sublime Text 3\sublime_text.exe
rem add it for all file types
rem commented because it's already an option during installation
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
groovenectar /
Last active Nov 22, 2016
Windows - Resetting folder/file permissions - Generic fix for permission denied errors in Windows Explorer
groovenectar / .gitignore
Last active Oct 10, 2016 — forked from erfanimani/.gitignore
A refactored and modern .gitignore for Magento. Compatible for Git versions 2.7.0+. See this revision to use it for versions lower than 2.7.0:
View .gitignore
# Ignore everything in media, except for the htaccess files
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed
# (
View http-auth.php
Plugin Name: Http Auth
Plugin URI:
Description: This plugin allows you apply HTTP Auth on your site. You can apply Http Authentication all over the site or only the admin pages.
Version: 0.1
Author: Sami Ahmed Siddiqui and Yasir Ahmed Siddiqui
Author URI:
Text Domain: http-auth
View 1px-transparent-png-base64.txt
View wordpress-tag_slug__not_in.php
// Add tag_slug__not_in to valid taxonomy queries
add_action('parse_tax_query', function($wp_query) {
$q = &$wp_query->query_vars;
$tax_query = array();
if (!empty($q['tag_slug__not_in'])) {
$q['tag_slug__not_in'] = array_map('sanitize_title_for_query', array_unique((array)$q['tag_slug__not_in']));
$tax_query[] = array(