Skip to content

Instantly share code, notes, and snippets.

View gist:e2c602bba8fe1c275f8c625143749cb2
BuildEvent(target_name='SCV', second=0)
BuildEvent(target_name='SCV', second=11)
BuildEvent(target_name='SupplyDepot', second=23)
BuildEvent(target_name='SCV', second=28)
BuildEvent(target_name='SCV', second=36)
BuildEvent(target_name='Barracks', second=54)
BuildEvent(target_name='Refinery', second=59)
BuildEvent(target_name='SCV', second=64)
BuildEvent(target_name='SCV', second=74)
BuildEvent(target_name='SCV', second=92)
View tarsnap strace
execve("/usr/bin/tarsnap", ["tarsnap", "--list-archives"], 0x7ffe6c18dda8 /* 16 vars */) = 0
brk(NULL) = 0x55790f6a4000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe4c4b2fe0) = -1 EINVAL (Invalid argument)
access("/etc/", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=67637, ...}) = 0
mmap(NULL, 67637, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f819d656000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\30\0\0\0\0\0\0"..., 832) = 832
View gist:944fdad330084d4e3619b5f11d167e33
import numpy as np
import random
import quopri
lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porta varius vulputate. Nullam ultricies consequat iaculis. Mauris vulputate diam lacus, sit amet pharetra elit volutpat nec. Vivamus lectus arcu, facilisis ac varius in, imperdiet nec libero. Nulla pellentesque purus id iaculis placerat. Phasellus nec dapibus diam. Mauris vel accumsan ex, non imperdiet justo. Maecenas at ligula fringilla, molestie lorem eget, cursus lacus. Nulla luctus ornare ipsum. Pellentesque vitae commodo nulla. Cras finibus luctus arcu et porttitor.Donec vel neque sed elit bibendum sodales. In ultricies enim nec elit posuere tincidunt. Aliquam nec ante et lectus varius aliquam. Etiam in finibus diam. Maecenas non nulla id purus tincidunt interdum non nec neque. Integer rhoncus quam non congue tempus. Maecenas non rhoncus quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam id fringilla nibh. Nulla quis
View example_email.msg
Return-Path: <>
Received: from ( [])
by with ESMTPS id m33si2685361qtd.41.2017.
for <>
(version=TLS1_2 cipher=AES128-GCM-SHA256 bits=128/128);
Thu, 23 Feb 2017 21:00:13 -0800 (PST)
spf=pass ( domain of designates as permitted sender);
View form-redirect-params.js
* Append the form data from a HubSpot form automatically
* to the redirect URL query parameters. These values can
* then be used on the form to modify the user experience
* of the Thank You page
* Form redirect
* Written in 2015 by Mike Axiak <>
* To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
View gist:867e8d459bddfbecd705
public class CommandHelloWorld extends HystrixCommand<String> {
private final String name;
public CommandHelloWorld(String name) {
super(HystrixCommandGroupKey.Factory.asKey("ExampleGroup")); = name;
View gist:7455969
// All over the place
if (maybeWidget.isPresent()) {
return maybeWidget.get();
} else {
throw new WidgetNotFoundException(id);
// Maybe instead?
return maybeWidget.orThrow(new WidgetNotFoundException(id));
// Before
Optional<Widget> maybeWidget = ...
if (maybeWidget.isPresent()) {
return maybeWidget.get();
} else {
throw new WidgetNotFoundException(widgetId);
// After