Skip to content

Instantly share code, notes, and snippets.

@abeyer
abeyer / main.py
Created December 3, 2023 06:26
AOC 23 - Day 3
import collections
import copy
import dataclasses
import enum
import re
import pprint
import string
import sys
@abeyer
abeyer / test_zero_utterance_volume.js
Last active October 17, 2022 03:18
SpeechSynthesis zero utterance volume bug test
testZero = new SpeechSynthesisUtterance("test zero")
testZero.volume = 1.0;
testSmall = new SpeechSynthesisUtterance("test small")
testSmall.volume = 1.0;
failedZero = new SpeechSynthesisUtterance("failed")
failedZero.volume = 0.0;
failedSmall = new SpeechSynthesisUtterance("failed")
@abeyer
abeyer / pytest.ini
Created April 9, 2017 09:11
Quick demo running pytest, hypothesis, and doctest together
[pytest]
addopts = --doctest-modules
@abeyer
abeyer / kpcli.py
Created January 27, 2017 22:39
CLI interactive shell for keepass 1 database
#!/usr/bin/env python
from cmd import Cmd
from getpass import getpass
import sys
from kppy.database import KPDBv1
from kppy.exceptions import KPError
class KPPYShell(Cmd):
/**
* @OnlyCurrentDoc
*/
/*
* Triggers
*/
function onOpen() {
var ss = SpreadsheetApp.getActive();
@abeyer
abeyer / form.php
Last active September 25, 2016 00:01
php $_POST and $_SESSION
<form class="form-horizontal" role="form" method="post" action="formHandler.php">
<label for="name" class="col-sm-2 control-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="name" name="name" placeholder="Your Name" value="">
</div>
<div class="col-sm-10 col-sm-offset-2">
<input id="submit" name="submit" type="submit" value="submit" class="btn btn-primary">
</div>
@abeyer
abeyer / PBClearMultiPicklist.apxc
Created August 24, 2016 21:22
Set or clear multiselect picklist values from process builder
public class PBClearMultiPicklist {
public class Params {
@InvocableVariable(label='Object ID' required=true)
public String sobjectId;
@InvocableVariable(label='Picklist Field API Name' required=true)
public String fieldName;
@InvocableVariable(label='Value' required=true)
public String value;
@abeyer
abeyer / SlackMessage.class
Created February 25, 2016 22:50
Post to slack webhooks from salesforce process builder
public with sharing class SlackMessage {
public class Params {
@InvocableVariable(label='Message' required=true)
public String msg;
}
@InvocableMethod(
label='Send a message to Slack'
description='Send the Message argument as text to a Slack webhook endpoint.'

Keybase proof

I hereby claim:

  • I am abeyer on github.
  • I am abeyer (https://keybase.io/abeyer) on keybase.
  • I have a public key ASByivrkp_JvSmCuBsZg5Ie-3jAntG9nPUKqKIaFSdWAIAo

To claim this, I am signing this object:

import re
import icalendar
import pytz
strkeys = ['UID','SUMMARY','LOCATION','DESCRIPTION']
timekeys = ['DTSTART', 'DTEND']
otherkeys = ['STATUS']
tz = pytz.timezone("US/Pacific")