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 -e | |
CIRCLE_TOKEN=PRIVATE | |
API_ROOT=https://circleci.com/api/v1 | |
_project=PRIVATE | |
_branch=circle-ci-test | |
URL=${API_ROOT}/project/${_project}/tree/${_branch}?circle-token=${CIRCLE_TOKEN} |
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
from rdioapi import Rdio | |
__author__ = 'davedash' | |
CLIENT_ID='' | |
CONSUMER_SECRET='' | |
def main(): | |
r = Rdio(CLIENT_ID, CONSUMER_SECRET, {}) |
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
// ==UserScript== | |
// @name Fix AWS Status | |
// @namespace http://davedash.com/ | |
// @version 0.1 | |
// @description Fix the status icons so they are more obvious | |
// @author Dave Dash | |
// @match http://status.aws.amazon.com/ | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== |
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
# Import a blog post. | |
def ingest(external_post) | |
map = nil | |
MyStatsd.client.time('find_map') do | |
map = AuthorExternalMap.find_by_external_id(external_post.author_id) | |
end | |
if map.present? | |
author = nil | |
MyStatsd.client.time('find_author') do |
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
# Import a blog post. | |
def ingest(external_post) | |
map = AuthorExternalMap.find_by_external_id(external_post.author_id) | |
if map.present? | |
author = Author.where(id: map.author_id).include(posts: [:categories]).try(:first) | |
category = Category.find_or_create_by!(name: external_post.category_name) | |
post = find_existing_post(external_post) | |
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 | |
set -e | |
# An example hook script to verify what is about to be pushed. Called by "git | |
# push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# |
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
"analysis": { | |
"filter": { | |
"autocomplete_filter": { | |
"type": "edge_ngram", | |
"min_gram": "1", | |
"max_gram": "20" | |
}, | |
"word_joiner": { | |
"type": "word_delimiter", | |
"catenate_all": true |
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
"word_joiner": { | |
"type": "word_delimiter", | |
"catenate_all": true | |
} |
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
{ | |
"index": { | |
"analysis": { | |
"filter": { | |
"autocomplete_filter": { | |
"type": "edge_ngram", | |
"min_gram": "1", | |
"max_gram": "20" | |
}, | |
"word_joiner": { |
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 -e | |
# This script finds IAM users who have passwords but no MFA. | |
# Deal with them accordingly. | |
# Generate a report | |
aws iam generate-credential-report > /dev/null | |
# Download report. | |
REPORT=$(aws iam get-credential-report) |