This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var preventDefaultHandler = jasmine.createSpy('defaultPreventedHandler'); | |
React.addons.TestUtils.Simulate.click( | |
link, | |
{ preventDefault: function() { preventDefaultHandler.call(); }} | |
); | |
expect(preventDefaultHandler).toHaveBeenCalled(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body { | |
border: none; | |
margin: 0px; | |
padding: 0px; | |
overflow: hidden; | |
} | |
iframe { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# winrm quickconfig -q | |
cmd.exe /c 'winrm quickconfig -q' | |
"winrm quickconfig -q (Exit Code: ${LASTEXITCODE})" | |
# winrm quickconfig -transport:http | |
cmd.exe /c 'winrm quickconfig -transport:http' | |
"winrm quickconfig -transport:http (Exit Code: ${LASTEXITCODE})" | |
# Win RM AllowUnencrypted | |
cmd.exe /c 'winrm set winrm/config/service @{AllowUnencrypted="true"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"math" | |
"math/big" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login-fly () | |
{ | |
expect <(cat <<EOF | |
spawn fly -t credhub login | |
expect "1: GitHub" | |
send -- "1\r" | |
expect -re "https://.*fly_local_port=\[0-9\]*" | |
set url [ string map { "\&" "\\\&" } \$expect_out(0,string) ] | |
system open \$url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
credhub_pid=$(cat /var/vcap/sys/run/credhub/pid) | |
uaa_pid=$(cat /var/vcap/data/sys/run/uaa/uaa.pid) | |
lsof_output="$(lsof)" | |
total_open_files=$(echo "$lsof_output" | wc -l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" | |
"crypto/x509/pkix" | |
"encoding/pem" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
cat >file.txt << 'EOF' | |
LINE 1 \ | |
LINE 2 \ | |
LINE 5 | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $(basename "$0") <number-of-times-to-run-job>" | |
exit 1 | |
fi | |
total_runs="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for pipeline in $(fly -t "$target" pipelines --json | jq -r '.[].name'); do | |
for job in $(fly -t "$target" jobs -p "$pipeline" --json | jq -r '.[].name'); do | |
for build in $(fly -t "$target" builds -j "$pipeline/$job" -c 10 --json | jq -r '.[] | select(.status != "pending" and .status != "started").name'); do | |
( fly -t "$target" watch -j "$pipeline/$job" -b "$build" | grep -q "$SEARCH_PATTERN" && echo "$pipeline/$job/$build" ) & | |
done | |
done | |
done |
OlderNewer