Skip to content

Instantly share code, notes, and snippets.

View doughgle's full-sized avatar

Douglas Hellinger doughgle

View GitHub Profile
@pgolding
pgolding / conditional_check_fail.py
Created December 12, 2017 17:13
The unclearly documented error exceptions of Boto3 (Python) DynamoDB - e.g. ConditionalCheckFailedException
from botocore import exceptions
try:
# to update table conditionally
except exceptions.ClientError as e:
if e.response['Error']['Code'] == 'ConditionalCheckFailedException':
print("ConditionalCheckFailedException detected")
# do something else, like raise a custom error based on the condition
@raydog
raydog / bullshit.js
Last active October 9, 2024 01:04
Bullshit as a Service
var E_PREFIX_RATE = 0.25;
// All of our word lists:
var _word_lists = {
verb : [
"implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace",
"enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize",
"morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate",
@chbaranowski
chbaranowski / EchoTest.java
Created December 10, 2011 12:37
Cheat Sheet Test for Mockito
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.mockito.Mockito.*;
import static org.mockito.BDDMockito.*;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;