Skip to content

Instantly share code, notes, and snippets.

@szarroug3
szarroug3 / split_audiobook_chapters.py
Last active August 15, 2018 22:50
Split audiobook into chapters
#!/usr/bin/env python
"""
Script to split audiobook chapters into separate files using metadata
"""
from __future__ import print_function
import os
import re
@thomxc
thomxc / InsertDate.gs
Created April 2, 2014 08:17
Google Docs Script Macro: Insert Date
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation:
@malloc47
malloc47 / README.md
Last active January 27, 2020 23:41
OS X Sierra Keybindings Per Application Using Hammerspoon

OS X Sierra + VirtualBox + Hammerspoon

I prefer different modifier keybindings for my VM vs. native OS X, but VirtualBox (unlike VMWare/Parallels) passes the keyboard through to the VM natively without the ability to remap it on the way through.

Apparently one would normally use Karabiner to do all manner of trickery to remap keys per application etc. but support for this utility was broken in OS X Sierra. Instead, I use a pair of scripts:

@seperman
seperman / AutoHotkey_ErgoKeyboard
Last active June 24, 2020 06:22
Auto Hot Key configs to make Windows shortcuts/keyboard like Mac
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one .ahk file simultaneously and each will get its own tray icon.
@adnan360
adnan360 / notification-sidebar.py
Last active July 20, 2020 04:39
A simple sidebar showing all the system notifications - based on xfce4-notifyd
# Written by Adnan Shameem
# License: CC0 - do whatever you want with it
# This script relies on xfce-notifyd. It is lightweight and saves the
# notifications in a ~/.cache/xfce4/notifyd/log file which is formatted
# in INI type format.
# To make this script work,
# 1. Install notification-daemon
# 2. Install xfce4-notifyd
# 3. Run either:
@candidtim
candidtim / myappindicator_v3.py
Created February 12, 2015 20:59
Minimal Ubuntu AppIndicator in Python, with "Quit" menu item
import signal
from gi.repository import Gtk as gtk
from gi.repository import AppIndicator3 as appindicator
APPINDICATOR_ID = 'myappindicator'
def main():
indicator = appindicator.Indicator.new(APPINDICATOR_ID, 'whatever', appindicator.IndicatorCategory.SYSTEM_SERVICES)
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
indicator.set_menu(build_menu())
@flozz
flozz / gnome_shell_wayland_meta_window_hack.py
Created May 14, 2018 18:06
A small hack that allows to manipulate windows on GNOME Shell / Wayland
#!/usr/bin/env python
import json
import pydbus
GNOME_SHELL = "org.gnome.Shell"
META_WINDOW_JS = """
(function(params) {
@marcorichetta
marcorichetta / ExtensionsProvider.md
Last active December 14, 2020 21:09
Change OpenVSX for MS Marketplace as extensions provider
find /usr/share/ -name "product.json"

# cd into vscodum directory
cd /usr/share/vscodium-bin/resources/app

nano product.json
@anvaka
anvaka / top-github.md
Last active February 3, 2021 19:58
Top GitHub users by total number of stars

I was playing with GitHub Archive recently. Out of curiosity I ran this query:

SELECT COUNT(repository_owner) as totalStars, repository_owner
FROM [githubarchive:github.timeline] 
WHERE type = 'WatchEvent'
GROUP BY repository_owner
ORDER BY totalStars DESC
LIMIT 1000
@niclasnilsson
niclasnilsson / config
Last active June 17, 2021 13:30
Example ~/.ssh/config for dealing with JSch and public key authentication with encrypted (password protected) keys.
# Example ~/.ssh/config for dealing with JSch problems regarding
# ssh public key authentication with encrypted (password protected) keys.
#
# First, a problem description and a couple of solutions that worked for me,
# (in March 2018 on MacOS High Sierra) and in the bottom youäll find an example
# config that doesn't interfere with JSch's use of the ssh-agent.
#
#
# Problem description:
# --------------------