Skip to content

Instantly share code, notes, and snippets.

View deathweaselx86's full-sized avatar
🦕
🌚 🌑 🌔 🌕 🌝

Jessica Ross McKinnie deathweaselx86

🦕
🌚 🌑 🌔 🌕 🌝
View GitHub Profile
@deathweaselx86
deathweaselx86 / interview.md
Last active September 2, 2020 17:01
Sample SRE questions for a SWE interview

Talk about yourself

  • Tell me about your software development journey. How did you end up here?
  • What excites you about software engineering?
  • What in particular interests you about $company?

Hopefully other stuff comes out of this


Your specific experience

  • Can you tell me about this event driven microservices architecture [or whatever interesting thing] you wrote? Can you diagram it?
@deathweaselx86
deathweaselx86 / twitter1.py
Created December 11, 2017 15:52
the end of some twitter stuff
import twitter
import json
import urllib2
WORLD_WOE_ID = 1
US_WOE_ID = 23424977
def authenticate():
CONSUMER_KEY = 'secret'
CONSUMER_SECRET = 'supersecret'
@deathweaselx86
deathweaselx86 / deleteLogGroup.js
Created September 25, 2017 16:19
get rid of Serverless created logGroups
'use strict';
const AWS = require('aws-sdk');
const cloudWatchLogs = new AWS.CloudWatchLogs({
apiVersion: '2014-03-28',
region: 'us-east-1'
});
const deleteCWLogs = (logGroupNamePrefix, token) => {
@deathweaselx86
deathweaselx86 / deleteLogGroup.js
Created September 25, 2017 16:19
get rid of Serverless created logGroups
'use strict';
const AWS = require('aws-sdk');
const cloudWatchLogs = new AWS.CloudWatchLogs({
apiVersion: '2014-03-28',
region: 'us-east-1'
});
const deleteCWLogs = (logGroupNamePrefix, token) => {
@deathweaselx86
deathweaselx86 / gist:8b273115d7a66760f613782645b3343d
Last active September 6, 2017 20:42
Simple script to determine what's going on with an ad or business
#!/usr/bin/env ruby
require 'optparse'
require_relative 'config/environment'
env = Rails.env
AD_ATTRS = [:id, :start_date, :end_date, :business_id, :slug, :processed, :processed_count, :processed_error,
:need_qc_at, :aasm_state, :created_at, :updated_at]
BUSINESS_ATTRS = [:id, :name, :aasm_state, :has_run_ad, :need_qc_at, :skipped_at, :deleted_at, :created_at, :updated_at]
@deathweaselx86
deathweaselx86 / reprocess_links.rake
Last active May 23, 2016 15:38
reprocess links
@deathweaselx86
deathweaselx86 / reprocess_hours.rake
Last active May 15, 2016 16:59 — forked from mltsy/reprocess_hours.rake
Takes a filename of an event log (plain text, not gz), finds all the verification events in that file and reprocesses the hours.
desc "open a given log file, and extract/save hours from all Business Verification records logged"
task :reprocess_hours, [:filename] => :environment do |t, args|
lines_read = lines_processed = lines_skipped = lines_failed = 0
filename = args[:filename]
puts "Reading lines from #{filename}..."
in_log = File.open(filename)
in_log.each do |line|
lines_read += 1
json = JSON.parse(line)