Skip to content

Instantly share code, notes, and snippets.

@danshick
danshick / trigger-screen-shot.py
Created March 4, 2021 19:34
Python script to trigger a screenshot via xdg-desktop-portal
#!/usr/bin/python3
# this used to live at https://gitlab.gnome.org/snippets/814
# but has since been deleted, the original author is unknown
# reuploading here for safe keeping
import dbus
import secrets
import re
@andymeneely
andymeneely / punchcard.rb
Created October 20, 2015 21:59
Slack Punchcard
require 'json'
require 'pp'
# To run this, create a directory called "export" in the current directory.
# Get admin access to Slack
# Get an export of the data.
# This will search export/standup/*.json files
users = {
'U0AB5BETT' => 'andymeneely',
@kocsenc
kocsenc / blueprint.md
Last active June 18, 2023 19:21
Installing jSpin for Unix/Linux and Mac

jSpin for Mac and Linux

This is a quick simple guide to getting jSpin setup for Mac and Linux.

Prereq's

You will need:

  • Java (1.5 +)
@will-hart
will-hart / plugin.py
Created July 1, 2013 09:36
A simple python plugin system using a custom metaclass
# a simple Python plugin loading system
# see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin-manager-vs-inspecting-from-plugins-import
class PluginMount(type):
"""
A plugin mount point derived from:
http://martyalchin.com/2008/jan/10/simple-plugin-framework/
Acts as a metaclass which creates anything inheriting from Plugin
"""
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',