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
# File located at /opt/homebrew/var/postgres/postgresql.conf | |
# Find `log_statement` and set it to 'all'. | |
log_statement = 'all' | |
# Postgres must be restarted before changes take effect. |
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
// Go to https://messages.google.com/web/voicemail | |
// Scroll through your messages to load all the unread messages | |
// Run this in your browser | |
const inputs = document.querySelectorAll('.unread'); | |
for (let i = 1; i < inputs.length; i++) { inputs[i].click() } |
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/local/bin/phantomjs --ssl-protocol=tlsv1 | |
// Script to screenshot the given URL. It renders when it receives | |
// a callPhantom invocation with {renderNow: true}. The viewport | |
// defaults to the URL's body size. | |
var system = require('system'); | |
// --------------------- Set Timeout --------------------- |
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
### Keybase proof | |
I hereby claim: | |
* I am ajsharma on github. | |
* I am ajsharma (https://keybase.io/ajsharma) on keybase. | |
* I have a public key ASC1LMGkHapAsykKIWOHbD9EUpKW0uoeBtq1ob4r_ZLGKgo | |
To claim this, I am signing this object: |
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
# Prompt the user for each failed Resque job | |
# Respond with `y` to retry, otherwise it's skipped | |
def triage | |
# Pop jobs off the queue until there are no more | |
Resque::Failure.all( 0, 0 ).each.with_index do |job, index| | |
puts "JOB:" | |
pp job.except( "backtrace" ) | |
puts "Retry? ('y')" |
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
SELECT item.counter, item.title, count(*), max(timestamp), item.framework | |
FROM item_occurrence | |
WHERE timestamp > unix_timestamp() - 60 * 60 * 24 | |
AND item.environment = 'production' | |
AND item.framework = 1 | |
AND item.level > 30 | |
GROUP BY item.counter | |
ORDER BY count(*) DESC | |
LIMIT 1000 |
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
SELECT body.trace.exception.class, count(*), sum(item.total_occurrences), min(timestamp), max(timestamp), level, environment, item.status | |
FROM item_occurrence | |
WHERE timestamp > unix_timestamp() - 60 * 60 * 24 * 77 | |
AND item.status = 1 | |
AND language = 'ruby' | |
AND item.level >= 40 | |
AND environment = 'production' | |
GROUP BY body.trace.exception.class | |
LIMIT 500 |
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
group :development do | |
gem 'circleci', require: false | |
end |
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
class Primes: | |
"""Get primes, fast. Eat lots of memory""" | |
@staticmethod | |
def list_all_up_to(ceiling): | |
"""Creates a list of prime numbers up to the ceiling""" | |
limit = int((ceiling - 1) / 2) | |
prime_map = [True] * limit | |
list_of_primes = [2] | |
index = 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
/**! | |
* Basic boilerplate for writing JQuery plugins | |
**/ | |
;(function ( $, window, document, undefined ) { | |
//TODO: code goes here | |
$(document).ready(function() { | |
// TODO: runtime code goes here | |
} |
NewerOlder