Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Text;
namespace DELETEME
{
class Program
{
static void Main(string[] args) {
Func<string, string> polite = name => {
if (name.Length > 4)
fn stub(function: fn(&[&str])) -> &str {
let original_function = function;
function = |arg: &[&str]| {
println("I'm in my stub wrapper");
original_function(arg);
}
}
fn main() {
it("works", ||{
expect("hello").to(eq("hello"));
expect("hello").to(eq("Hello"));
expect(1).to(eq(2));
expect(1).to(eq(1));
});
}
struct Expectation<T> {
@wendorf
wendorf / add_key
Created February 8, 2016 22:05
Add this to the root of your USB drive to add your SSH key
#!/usr/bin/env bash
HOURS=$1
if [ -z $HOURS ]; then
echo "Usage: $0 <num hours>"
exit 1
fi
ssh-add -t ${HOURS}H $(dirname $0)/id_rsa
@wendorf
wendorf / feedback.md
Created April 7, 2016 17:31
How to feedback

Frequent Feedback Process

Professional development is a critical part of our culture and we are always striving to be even better. To help foster an environment of development and collaboration, we would like all of us to frequently provide brief but effective feedback on the lovely people you work with. We encourage you to provide feedback on any colleague you interact with, including people you pair with, your anchor, a PM or any other interactions you have with anyone around the office. We have procedures to provide feedback via email (or the internal Pivotal Feedback app for Pivot to Pivot feedback). However, we encourage all forms of feedback, especially in person.

Feedback Manifesto

A Set of Values - the Why of Personal Feedback

We are uncovering better ways of fostering personal growth by providing regular Actionable, Specific and Kind feedback. We believe it is everyone's job to make everyone better. To accomplish this we have come to value:

  • Frequency of interaction over processes an
2016/12/05 18:01:44 [INFO] Terraform version: 0.7.13
2016/12/05 18:01:44 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.7.13/bin/terraform", "apply"}
2016/12/05 18:01:44 [DEBUG] Detected home directory from env var: /Users/me
2016/12/05 18:01:44 [DEBUG] Detected home directory from env var: /Users/me
2016/12/05 18:01:44 [DEBUG] Attempting to open CLI config file: /Users/me/.terraformrc
2016/12/05 18:01:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/12/05 18:01:44 [DEBUG] Detected home directory from env var: /Users/me
2016/12/05 18:01:44 [DEBUG] DestroyEdgeInclude: Checking: google_compute_url_map.url_map
2016/12/05 18:01:44 [DEBUG] DestroyEdgeInclude: Checking: google_compute_ssl_certificate.ssl_certificate
2016/12/05 18:01:44 [DEBUG] DestroyEdgeInclude: Checking: google_compute_target_https_proxy.target_https_proxy
2017/01/05 10:50:24 [INFO] Terraform version: 0.8.2
2017/01/05 10:50:24 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.8.2/bin/terraform", "apply"}
2017/01/05 10:50:24 [DEBUG] Detected home directory from env var: /Users/pivotal
2017/01/05 10:50:24 [DEBUG] Detected home directory from env var: /Users/pivotal
2017/01/05 10:50:24 [DEBUG] Attempting to open CLI config file: /Users/pivotal/.terraformrc
2017/01/05 10:50:24 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/01/05 10:50:24 [DEBUG] Detected home directory from env var: /Users/pivotal
2017/01/05 10:50:24 [DEBUG] DestroyEdgeInclude: Checking: google_compute_network.network
2017/01/05 10:50:24 [DEBUG] DestroyEdgeInclude: Checking: google_compute_firewall.firewall
2017/01/05 10:50:24 [DEBUG] Checking variable noop: var.region
@wendorf
wendorf / base.theme.bash.patch
Created July 14, 2017 08:17
Display actual branch name and avoid interpolation vulnerability
diff --git a/themes/base.theme.bash b/themes/base.theme.bash
index 4dd9d0e..15f70fe 100644
--- a/themes/base.theme.bash
+++ b/themes/base.theme.bash
@@ -127,13 +127,9 @@ function scm_prompt_info_common {
[[ ${SCM} == ${SCM_SVN} ]] && svn_prompt_info && return
}
-# This is added to address bash shell interpolation vulnerability described
-# here: https://github.com/njhartwell/pw3nage
diff --git a/Library/Homebrew/cask/lib/hbc/scopes.rb b/Library/Homebrew/cask/lib/hbc/scopes.rb
index a469ae0fa6..342ae86dee 100644
--- a/Library/Homebrew/cask/lib/hbc/scopes.rb
+++ b/Library/Homebrew/cask/lib/hbc/scopes.rb
@@ -9,8 +9,12 @@ module Hbc
all_tokens.map(&CaskLoader.public_method(:load))
end
+ def all_tapped_cask_taps
+ Tap.select { |t| t.cask_dir.directory? }
@wendorf
wendorf / gist:91f5a2c77c3cdc277e48c2c22fc0b46b
Created April 17, 2018 18:15
AWS m3.large crash: kops 1.9, Kubernetes 1.9.3, kope.io/k8s-1.8-debian-jessie-amd64-hvm-ebs-2018-02-08
LS GSO support
[ 1.038498] divide error: 0000 [#1] SMP
[ 1.041372] Modules linked in:
[ 1.042450] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.115-k8s #1
[ 1.042450] Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
[ 1.042450] task: ffff8801e66bad80 ti: ffff8801e66bc000 task.ti: ffff8801e66bc000
[ 1.042450] RIP: 0010:[<ffffffff81b3c1e4>] [<ffffffff81b3c1e4>] init_intel_microcode+0x46/0x57
[ 1.042450] RSP: 0000:ffff8801e66bfe48 EFLAGS: 00010206
[ 1.042450] RAX: 0000000001900000 RBX: 00000000ffffffea RCX: 0000000000000000
[ 1.042450] RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000286