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
thing = "foo" | |
class Baz(): | |
def override_thing(self): | |
global thing | |
thing = 1 | |
def update_thing(self): |
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 | |
# Pass in your BEARER_TOKEN to this script to make it dance | |
mkdir -p ./testing | |
while true; do | |
echo "$(date): Polling /api/v2/users/ad%7CMozilla-LDAP%7Cjclaudius and dumping app_metadata and groups to file" | |
curl -H "Authorization: Bearer $BEARER_TOKEN" "https://auth.mozilla.auth0.com/api/v2/users/ad%7CMozilla-LDAP%7Cjclaudius" 2> /dev/null | jq -r '"\(.app_metadata)|\(.groups)"' > ./testing/$(date +%s) | |
sleep 5 | |
done |
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
import pickle | |
import os.path | |
import random | |
# Old pickle queue logic (summarized) | |
pickle_cache_file = "pickle.queue" | |
reset_list_count = 0 |
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
import random | |
emails = [] | |
sample_size = 20 | |
with open("emails.txt") as f: | |
for line in f: | |
emails.append(line) | |
for email in random.sample(emails, 20): |
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
require "bunny" | |
# Start a communication session with RabbitMQ | |
conn = Bunny.new | |
conn.start | |
# open a channel | |
ch = conn.create_channel | |
# declare a queue |
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
require "bunny" | |
# Start a communication session with RabbitMQ | |
conn = Bunny.new | |
conn.start | |
ch = conn.create_channel | |
q = ch.queue("test1") | |
loop do |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "The AWS CloudFormation template for this Serverless application", | |
"Resources": { | |
"ServerlessDeploymentBucket": { | |
"Type": "AWS::S3::Bucket" | |
} | |
}, | |
"Outputs": { | |
"ServerlessDeploymentBucketName": { |
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
(master) $ curl -i https://sshscan.rubidus.com/api/v1/scan/results?uuid=d46c613f-a7b1-429e-92e4-2bdb1aa858e6 | |
HTTP/1.1 200 OK | |
Server: nginx/1.10.0 (Ubuntu) | |
Date: Mon, 17 Sep 2018 15:10:29 GMT | |
Content-Type: application/json | |
Content-Length: 1640 | |
Connection: keep-alive | |
Access-Control-Allow-Methods: GET, POST, OPTIONS, HEAD | |
Access-Control-Allow-Origin: * | |
Access-Control-Max-Age: 86400 |
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
require 'levenshtein-ffi' | |
class String | |
def edit_distance(other) | |
raise unless other.is_a?(::String) | |
diff = Levenshtein.distance(self, other) | |
end | |
end | |
# Arbitrary gem list to test to determine if they are bad or not |
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
WARN notice [SECURITY] atob has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=atob&version=2.0.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info. | |
WARN notice [SECURITY] tough-cookie has the following vulnerabilities: 1 high, 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=tough-cookie&version=0.9.15 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info. | |
WARN notice [SECURITY] request has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=request&version=2.29.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info. | |
WARN notice [SECURITY] hawk has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hawk&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and t |