Skip to content

Instantly share code, notes, and snippets.

@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}
@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
@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
@heardk
heardk / OneNote-to-MD.md
Last active March 27, 2024 03:02
Convert notes from OneNote into Markdown

Converting One Note to Markdown

This is an example of how to convert notes from OneNote into Markdown to use in other, less annoying Note applications. I am using PowerShell on Windows here, but other shell/scripting environments would work as well. If you want separate .md files, you'll need to export your OneNote pages separately. Exporting a section, or a selection of pages creates a single .docx file.

  • Download and install Pandoc
  • Export each of your note pages to a .docx (Word) format using OneNote export from the File menu
  • Gather all of these .docx files into a directory
  • Open directory in File Explorer
  • Open Powershell from the File Explorer using File -> Open Windows Powersell
  • Run the following command:
@prasanthj
prasanthj / lirc-pi3.txt
Last active January 5, 2023 01:35
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@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"
#!/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
@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
@pixeline
pixeline / mirror_remote_directory_to_local_directory
Last active September 28, 2023 09:46
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY
@mistic100
mistic100 / Mediakeys.ahk
Last active February 10, 2024 10:26
Media keys shortcuts for AutoHotkey
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!NumpadMult::Send {Volume_Mute}
^!NumpadAdd::Send {Volume_Up}
^!NumpadSub::Send {Volume_Down}