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
DELETE joininess-product | |
DELETE joininess-save | |
DELETE joininess-user | |
PUT joininess-product | |
PUT joininess-save | |
PUT joininess-user | |
DELETE joininess-product/_mapping/product | |
GET joininess-product/_mapping/product |
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
> sudo dtrace -n '::forksys:entry / pid == $target / { printf("%d %d", arg0, arg1); }' -p 7580 | |
CPU ID FUNCTION:NAME | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
7 13517 forksys:entry 0 0 | |
0 13517 forksys:entry 0 0 | |
0 13517 forksys:entry 0 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
# The built-in Rails database rake task is completely crazy, and defines methods on Object. This causes | |
# problems with Makara, which uses a delegator pattern along with method_missing. | |
require 'active_support/core_ext/object/inclusion' | |
require 'active_record' | |
class Object | |
remove_method :configs_for_environment | |
remove_method :create_database | |
remove_method :current_config |
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
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
# | |
# This file consists of lines of the form: | |
# | |
# name = value | |
# | |
# (The "=" is optional.) Whitespace may be used. Comments are introduced with | |
# "#" anywhere on a line. The complete list of parameter names and allowed |
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
common: &common | |
adapter: postgresql | |
host: 127.0.0.1 | |
port: 5432 | |
username: ******* | |
password: ******* | |
encoding: unicode | |
pool: 20 | |
min_messages: WARNING | |
schema_search_path: public |
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 'active_record/connection_adapters/postgresql_adapter' | |
module ActiveRecord | |
module ConnectionAdapters | |
class TableDefinition | |
def references(*args) | |
options = args.extract_options! | |
polymorphic = options.delete(:polymorphic) | |
index_options = options.delete(:index) | |
args.each do |col| |
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
execute <<-EOSQL | |
CREATE SEQUENCE #{schema}.id_generator_seq; | |
CREATE OR REPLACE FUNCTION #{schema}.current_shard_id(OUT result int) AS $$ | |
BEGIN | |
result := #{shard_id}; | |
END; | |
$$ LANGUAGE PLPGSQL; |
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
# interpolated load tables step | |
find . -type f -print0 | xargs -0 -n1 -P50 bash -c "psql -U <postgres_user> <mydatabase> < \$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
class Worker | |
include Sidekiq::Worker | |
def perform(message) | |
puts message | |
end | |
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
ffmpeg -i video.mp4 -vf \ | |
"movie=logo.png [overlay]; \ | |
[overlay] scale=250:-1 [a]; \ | |
[a] format=yuva420p,colorchannelmixer=aa=0.5 [b]; \ | |
[in] curves=preset=lighter [vid]; \ | |
[vid][b] overlay=50:50 [out]" \ | |
-pix_fmt yuv420p \ | |
output.mp4 \ | |
&& terminal-notifier -message 'done' |