Skip to content

Instantly share code, notes, and snippets.

@unglitched
unglitched / iterm2kitty.py
Created January 24, 2020 01:18
Convert .itermcolors file to kitty term theme colors
#!/usr/bin/env python3
#
# Convert .itermcolors files to kitty terminal color settings.
# Modded from https://gist.github.com/MSylvia/4e90860743f1a4de187d
# Might need to adjust dicts[i][NUMBER].text per your file.
import sys
import xml.etree.ElementTree as ET
def rgb_to_hex(rgb):
@youandhubris
youandhubris / AppleScript Mail Send.scpt
Last active May 17, 2024 01:40
AppleScript to send e-mail, using Apple's Mail, with multiple recipients, cc, bcc and attachments
tell application "Mail"
set theFrom to ""
set theTos to {}
set theCcs to {}
set theBccs to {}
set theSubject to ""
set theContent to ""
set theSignature to ""
@itst
itst / Pinboard.scpt
Last active January 10, 2024 11:40
Import and regularly replicate your Pinboard bookmarks in DEVONthink.
(* Import and update your Pinboard bookmarks to DEVONthink
Based on work done by Christian Grunenberg on Mon Jan 23 2006,
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished.
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items
Copyright (c) 2018. All rights reserved. *)
use framework "Foundation"
@mitcdh
mitcdh / Pinboard (archive).applescript
Last active April 26, 2019 14:26
Pinboard archive script for Devonthink Pro that archives bookmarks as web documents rather than just links
-- Import Pinboard bookmarks
-- Created by Christian Grunenberg on Mon Jan 23 2006.
-- Modified by Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010.
-- Modified by Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished
-- Modified by Mitchell Hewes on 2017-04-03 to archive bookmarks as PDF documents
-- Copyright (c) 2006-2014. All rights reserved.
-- If the properties pUser and pPassword are undefined then a dialog pops up asking for these properties
property pUser : ""
property pPassword : ""
@clickysteve
clickysteve / init.lua
Last active December 9, 2022 08:18 — forked from prenagha/init.lua
Hammerspoon config file for getting Hyper Key (Caps) to work on Sierra
-- My own config file to get the Hyper Key working again with my current setup.
-- All credit goes to @prenagha and @ttscoff for their awesome original code that I tweaked for my own devices.
-- Credit 1: https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907
-- Credit 2: https://gist.github.com/prenagha/1c28f71cb4d52b3133a4bff1b3849c3e
-- A global variable for the sub-key Hyper Mode
k = hs.hotkey.modal.new({}, 'F17')
-- Hyper-key for all the below are setup somewhere... Usually Keyboard Maestro or similar. Alfred doesn't handle them very well, so will set up separate bindings for individual apps below.
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@MattMcFarland
MattMcFarland / styles.less
Created July 15, 2016 17:00
Ligature fonts for atom
atom-text-editor {
font-family: 'Fira Code';
font-style: normal;
text-rendering: optimizeLegibility;
}
atom-text-editor::shadow {
.string.quoted,
.string.regexp {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@annard
annard / Import Instapaper CSV.applescript
Last active September 20, 2019 20:29
Import Instapaper articles (exported as CSV from their site) using Numbers into DEVONthink Pro (Office). The web pages will be imported as PDF documents. The folder structure of Instapaper will be replicated in an "Instapaper" top level group for the currently open database.
-- Use Instapaper to export a CSV file of your articles.
-- Must have Numbers to open it in.
-- Will create PDF documents in /Instapaper/<your folder in Instapaper> groups.
-- Be sure to select an open database in DT Pro before you run this.
--
-- Created by Annard Brouwer, 24/08/2014
--
-- This program is free software released "as-is"; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-- Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(*
http://zoesmith.io
Export Bookmarks from Evernote to Pinboard
v1.4 12th September 2012
This script takes selected notes in Evernote and sends an email for each to Pinboard, extracting each note's title, source URL and associated tags. The user should enter their Pinboard email address in the pinboardEmail property below, and can choose a default tag to add to each bookmark on import.
This code is hacky, horrible and non-error checking (but it worked for me). Don't use on thousands of notes at a time, it'll go all crashy. Try selecting one test note first to see if it works for you.
Change log: