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 | |
# | |
# /etc/init.d/kibana4 -- startup script for kibana4 | |
# [email protected] 2015-02-20; used elasticsearch init script as template | |
# https://github.com/akabdog/scripts/edit/master/kibana4_init | |
# | |
### BEGIN INIT INFO | |
# Provides: kibana4 | |
# Required-Start: $network $remote_fs $named | |
# Required-Stop: $network $remote_fs $named |
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
Adam: https://open.spotify.com/user/spotifydiscover/playlist/0f4h4WmPq27eYrXCz93Ncj | |
Zach: https://open.spotify.com/user/spotifydiscover/playlist/4oovRX5zvmhuzC3uX7Es8v | |
Chris: https://open.spotify.com/user/spotifydiscover/playlist/0FsK5ub7IXpa7J78t03uth | |
Sascha: https://open.spotify.com/user/spotifydiscover/playlist/4NfabV5DBk1RdMQOUiRIiE | |
Cam: https://open.spotify.com/user/spotifydiscover/playlist/7KnDkFHwq8BY6WAMbdB8Wf | |
Sarah: https://open.spotify.com/user/spotifydiscover/playlist/7EFdKTPZKnzbrTj8wf4YMG | |
Becky: https://open.spotify.com/user/spotify/playlist/37i9dQZEVXcS4Wh3BmdREX |
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
#!/usr/bin/env ruby | |
if `git diff HEAD spec` =~ /^\+.*,\s?(:focus|focus:\s?true|:focus\s?=>\s?true)/ | |
puts "\e[31mPlease focus and remove your :focus tags before committing :)" | |
exit 1 | |
end |
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
SELECT | |
relid::regclass AS table, | |
indexrelid::regclass AS index, | |
pg_size_pretty(pg_relation_size(indexrelid::regclass)) AS index_size, | |
idx_tup_read, | |
idx_tup_fetch, | |
idx_scan | |
FROM | |
pg_stat_user_indexes | |
JOIN pg_index USING (indexrelid) |
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
[02:23:06 (master) ~/mozilla/phageParser]$ pep8 --statistics -qq ./ | |
4 E101 indentation contains mixed spaces and tabs | |
2 E111 indentation is not a multiple of four | |
1 E124 closing bracket does not match visual indentation | |
6 E201 whitespace after '[' | |
1 E202 whitespace before ']' | |
12 E211 whitespace before '(' | |
5 E221 multiple spaces before operator | |
8 E222 multiple spaces after operator | |
32 E225 missing whitespace around operator |
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
SELECT bl.pid AS blocked_pid, | |
a.usename AS blocked_user, | |
ka.query AS current_statement_in_blocking_process, | |
now() - ka.query_start AS blocking_duration, | |
kl.pid AS blocking_pid, | |
ka.usename AS blocking_user, | |
a.query AS blocked_statement, | |
now() - a.query_start AS blocked_duration | |
FROM pg_catalog.pg_locks bl | |
JOIN pg_catalog.pg_stat_activity a ON a.pid = bl.pid |
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
{ | |
"id": 5919, | |
"display_name": "Descriptive book", | |
"tasks": { | |
"T1": { | |
"next": "T2", | |
"type": "combo", | |
"tasks": [ | |
"T5", | |
"T7", |
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
[ | |
{ | |
"task": "T1", | |
"value": [ | |
{ | |
"task": "T5", | |
"value": "John Adams" | |
}, | |
{ | |
"task": "T7", |
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
# Manual csv classifications dump | |
# ensure you have a manual secondary database connection specified in config/database.yml | |
# | |
# run via rails runner from the panoptes cmd line via | |
# rails r project_classifications_csv_dump_export.rb | |
require 'csv' | |
PROJECT_ID = 1 |
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
# ssh onto the redis node in question and run these cmds | |
# congestion:* keys are for https://github.com/parrish/Sidekiq-Congestion | |
# uniquejobs:* https://github.com/mhenrixon/sidekiq-unique-jobs | |
# get a count of the locks | |
redis-cli -n 0 --scan --pattern 'congestion:*' | wc -l | |
redis-cli -n 0 --scan --pattern 'uniquejobs:*' | wc -l | |
# clear them for both key namespaces |
OlderNewer