Skip to content

Instantly share code, notes, and snippets.

@gilhooleyd
gilhooleyd / spotify.py
Created August 8, 2017 00:48
Siri Control + Spotify
import sys
import os
import subprocess
import spotipy
import spotipy.util as util
import json
#This is name of the module - it can be anything you want
moduleName = "spotify"
@edmondscommerce
edmondscommerce / BASH_function_to_email_via_Gmail_SMTP.bash
Last active August 21, 2018 07:58
BASH function to email via Gmail SMTP
# Bash function to send email via Gmail SMTP
# sendEmail [subject] [toEmail] [message] (optional attachment path)
function sendEmail(){
if (($# < 3 ))
then
echo ""
echo "Usage:"
echo "sendEmail [subject] [toEmail] [message] (optional attachment path)"
echo ""
exit 1
@kfigiela
kfigiela / Denon_RC-1163_lircd.conf
Last active October 5, 2018 15:15
LIRC config file for Denon RC-1163 remote for DRA-F109/DNP-F109/DCD-F109
# contributed by Kamil Figiela
#
# brand: Denon
# model no. of remote control: RC-1163
# devices being controlled by this remote: DRA-F109/DNP-F109/DCD-F109
#
# DRA-F109 has also serial port in its "Remote Connector" that provides better integration.
# See blog post for more information: http://kfigiela.github.io/2014/06/15/denon-remote-connector/
begin remote
@biggyspender
biggyspender / instructions.txt
Last active October 22, 2018 13:33
install mopidy/mopify/moped with libspotify on Raspberry Pi 2 fresh Raspbian image
sudo apt-get update
sudo apt-get upgrade -y
mkdir ~/mopidytemp
cd ~/mopidytemp/
wget https://apt.mopidy.com/mopidy.gpg
sudo apt-key add mopidy.gpg
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/mopidy.list
sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install python-pip
#!/usr/bin/env python
# -*- coding: utf8 -*-
# MFRC522_test.py - Copyright 2017-2019, Phil Elwell, Raspberry Pi (Trading) Ltd.
import RPi.GPIO as GPIO
import spi
import signal
import time
@CherryDT
CherryDT / evernote_code_wrap.ahk
Last active August 6, 2020 13:09
Evernote clipboard code wrapper tool
; AutoHotkey script to wrap plain text clipboard contents for Evernote in such a way that they can be pasted as code
; block and won't get double empty lines, removed indents or anything like that.
; By David Trapp
; License: MIT
; WinClip is required, from here: https://autohotkey.com/board/topic/74670-class-winclip-direct-clipboard-manipulations/
#include %A_ScriptDir%\WinClipAPI.ahk
#include %A_ScriptDir%\WinClip.ahk
@CreamyCookie
CreamyCookie / auto_update_tags_in_files.py
Last active September 23, 2020 17:39
QuodLibet Plugin that automatically stores ratings and playcounts in the respective files
# Copyright 2016 Joschua Gandert
#
# This program is free software; 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.
from traceback import format_exc
@tatoosh
tatoosh / Mediakeys.ahk
Last active March 14, 2021 20:45 — forked from mistic100/Mediakeys.ahk
Media keys shortcuts for AutoHotkey
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!#::Send {Volume_Mute}
^!Up::Send {Volume_Up}
^!Down::Send {Volume_Down}
@kyle-ilantzis
kyle-ilantzis / open-w-atom.reg
Last active June 1, 2021 17:20
Adds 'Open in Atom' to context menu in Windows Explorer.
Windows Registry Editor Version 5.00
;
; Adds 'Open in Atom' to context menu (when you right click) in Windows Explorer.
;
; Based on https://github.com/Zren/atom-windows-context-menu. It didn't work
; https://github.com/Zren/atom-windows-context-menu/issues/1.
;
; Save this file to disk with a .reg extension. Replace C:\\Atom\\atom.exe with
; the path to the atom executable on your machine.
@mayo
mayo / README.md
Created March 11, 2015 07:19
Convert Simplenote Export JSON file into multiple Markdown files

SimpleNote to Markdown

This script converts JSON file from Simplenote Export web service into individual Markdown files.

It's nothing fancy, first argument is the JSON file, second argument is directory to write the notes to. The note files are named by using the first 60 characters (or a little more, up to a full word) of the first line of the note, stripped of any characters outside of letters, simple dash, underscore, brackets, space, single quote, and plug and equal signs.

Tags are stored on the bottom of the note on a line starting with "TAGS:", and the SimpleNote note ID/key as a "KEY:" line.