See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
""" | |
A simple proxy server, based on original by gear11: | |
https://gist.github.com/gear11/8006132 | |
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough. | |
Usage: http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: http://localhost:5000/p/www.google.com | |
""" | |
import re |
#2968C2,#00337a,#144869,#FFFFFF,#0077ff,#FFFFFF,#5bf700,#00ffdd |
public class RetrierTest { | |
private static int count = 0; | |
@Rule public RetryRule rule = new RetryRule(); | |
@Test | |
@Retry | |
public void failsFirst() throws Exception { | |
count++; | |
assertEquals(2, count); |
'use strict' | |
const timeout = ms => new Promise(res => setTimeout(res, ms)) | |
function convinceMe (convince) { | |
let unixTime = Math.round(+new Date() / 1000) | |
console.log(`Delay ${convince} at ${unixTime}`) | |
} | |
async function delay () { |
#!/bin/bash | |
TABLE_NAME=TableName | |
KEY=id | |
aws dynamodb scan --table-name $TABLE_NAME --attributes-to-get "id" --query "Items[].id.S" --output text | tr "\t" "\n" | xargs -t -I keyvalue aws dynamodb delete-item --table-name $TABLE_NAME --key '{"id": {"S": "keyvalue"}}' |
#!/usr/bin/env python | |
import json | |
import time | |
import argparse | |
import boto.sqs | |
from termcolor import cprint | |
# Signal catching | |
def shut_down | |
puts "\nShutting down gracefully..." | |
sleep 1 | |
end | |
puts "I have PID #{Process.pid}" | |
# Trap ^C | |
Signal.trap("INT") { |
static void | |
rb_check_deadlock(rb_vm_t *vm) | |
{ | |
int found = 0; | |
rb_thread_t *th = 0; | |
if (vm_living_thread_num(vm) > vm->sleeper) return; | |
if (vm_living_thread_num(vm) < vm->sleeper) rb_bug("sleeper must not be more than vm_living_thread_num(vm)"); | |
if (patrol_thread && patrol_thread != GET_THREAD()) return; |