View categories-to-csv.go
This file contains 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 ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
) |
View validation-with-java-example
This file contains 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
if (val < 0 || val > 19) { | |
System.out.println("please read the instructions again"); | |
System.exit(0); | |
} |
View example.sh
This file contains 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/sh | |
echo "Hello World!" |
View stupid.sh
This file contains 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 | |
while [ true ]; | |
do | |
say "I am stupid" | |
SLEEPTIME=`jot -r 1 1 10` | |
sleep $SLEEPTIME | |
done |
View janus-api-test.sh
This file contains 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/sh | |
getConnection () | |
{ | |
curl -v -k -u engine:engineblock -H "Content-Type: application/json" -X GET https://serviceregistry.demo.openconext.org/janus/app_dev.php/api/connections/15.json | |
} | |
jqModify () | |
{ | |
# jq 'def key_contains: .key | contains(":sn") | not ; def filter_key(f): f | to_entries | map(select(key_contains)) | from_entries ; .arpAttributes = filter_key(.arpAttributes)' |
View deduplicate.php
This file contains 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
<?php | |
if (!isset($argv[1])) { | |
die('Usage: deduplicate.php "Dropbox/Camera Uploads/2014"' . PHP_EOL); | |
} | |
$path = $argv[1]; | |
if (!is_dir($path)) { | |
die("$path is not a dir!" . PHP_EOL); | |
} |
View xss.js
This file contains 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
alert('xss'); |
View json_decode.output
This file contains 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
/opt/local/bin/php53-bin/php /tmp/json_decode.php | |
count: 1090 | |
peak memory usage: 6 MiB | |
time: 13.12ms |
View gist:3cb61b198234be3ba419
This file contains 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
export LC_CTYPE=UTF-8; pbpaste | (echo '<?php ' && cat) | /usr/local/bin/pygmentize -l php -f rtf -O style=monokai,fontface=Monaco | sed 's/\\\\f0/\\\\f0\\\\fs72/g' | pbcopy -Prefer rtf |
View brute-force-chances.js
This file contains 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
/** | |
* Bit of code you can run in your developer toolbar or on https://jsfiddle.net . | |
* | |
* Fill in the characteristics of your own 'public file' solution and acceptance criteria. | |
*/ | |
(function(){ | |
'use strict'; | |
// dec=10,hex=16,[A-Z0-9]=36, etc. | |
var CHARACTER_COMBINATIONS = 16, |
NewerOlder