Skip to content

Instantly share code, notes, and snippets.

View kurisubrooks's full-sized avatar

Chris Brooks kurisubrooks

View GitHub Profile
@timlien
timlien / numbers-export-csv.sh
Last active April 8, 2021 07:02
Export mac numbers file into csv format with apple script
#!/usr/bin/osascript
on run argv
set theFilePath to POSIX file (item 1 of argv)
set theFolder to theFilePath as alias
tell application "System Events" to set theDocs to theFolder's items whose name extension = "numbers"
repeat with aDoc in theDocs
set docName to aDoc's name as text
exports.Endpoints = {
APPLICATIONS: '/applications',
APPLICATION_ICON: (n, t) => `/applications/${n}/icons/${t}.jpg`,
APPLICATION_RPC: (n) => `/oauth2/applications/${n}/rpc`,
AUTHORIZE_IP: '/auth/authorize-ip',
AVATAR: (n, t, e = t.startsWith('a_') ? 'gif' : 'webp') => `/users/${n}/avatars/${t}.${e}`,
BILLING: '/users/@me/billing',
BILLING_HISTORY: '/users/@me/billing/payments',
BILLING_PAYMENT_SOURCE: '/users/@me/billing/payment-source',
BILLING_PREMIUM_SUBSCRIPTION: '/users/@me/billing/premium-subscription',
@ZekNikZ
ZekNikZ / british-american-words.txt
Created August 15, 2016 00:50
A list of British English words and their American spellings.
acknowledgement acknowledgment
aeroplane airplane
aesthetic esthetic
ageing aging
aluminium aluminum
amoeba ameba
anaemia anemia
anaesthesia anesthesia
analyse analyze
analogue analog
@renehamburger
renehamburger / slimdown.js
Last active September 4, 2023 07:55
slimdown.js
'use strict';
/**
* Javascript version of https://gist.github.com/jbroadway/2836900
*
* Slimdown - A very basic regex-based Markdown parser. Supports the
* following elements (and can be extended via Slimdown::add_rule()):
*
* - Headers
* - Links
@prantlf
prantlf / logger.js
Last active February 22, 2022 09:56 — forked from rtgibbons/logger.js
Logger Library with winston - Fixed for additional log arguments
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
@elliots
elliots / test.js
Created July 22, 2014 07:16
Node.JS Wii U Pro Controller and Wiimote events
'use strict';
/*
* This handles Wii U Pro Controllers and Wiimotes, but doesn't yet detect which it is =)
* `npm install node-hid pakkit`
*/
var HID = require('node-hid');
var pakkit = require('pakkit');
@pudquick
pudquick / notify.py
Last active September 3, 2023 16:51
Notification in pyobjc
# Banner-style (default)
from Foundation import NSUserNotification, NSUserNotificationCenter
def notify(title, subtitle, text):
notification = NSUserNotification.alloc().init()
notification.setTitle_(str(title))
notification.setSubtitle_(str(subtitle))
notification.setInformativeText_(str(text))
notification.setSoundName_("NSUserNotificationDefaultSoundName")
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
@ashwin
ashwin / OpenTKExample.cs
Created June 7, 2013 04:20
An example C# program that uses OpenTK. Displays a colored triangle.
// C# example program to demonstrate OpenTK
//
// Steps:
// 1. Create an empty C# console application project in Visual Studio
// 2. Place OpenTK.dll in the directory of the C# source file
// 3. Add System.Drawing and OpenTK as References to the project
// 4. Paste this source code into the C# source file
// 5. Run. You should see a colored triangle. Press ESC to quit.
//
// Copyright (c) 2013 Ashwin Nanjappa