I hereby claim:
- I am ejoubaud on github.
- I am ejoubaud (https://keybase.io/ejoubaud) on keybase.
- I have a public key ASC4V70jP4GYLh15POtHMHdB6bbITboG_AUDC-wjPf4IZAo
To claim this, I am signing this object:
| aws ec2 describe-instances --region us-east-1 --query 'Reservations[].Instances[].[ Tags[?Key==`Name`].Value | [0], PrivateIpAddress, PublicIpAddress ]' --output text | sort |
| // Based on http://stackoverflow.com/a/10520017/1307721 | |
| // which wouldn't work for my use-case on my Mac because metaKey would always be true, for some reason | |
| // Adapted to override metaKey to false | |
| Podium = {}; | |
| Podium.keydown = function(k) { | |
| var oEvent = document.createEvent('KeyboardEvent'); | |
| // Chromium Hack | |
| Object.defineProperty(oEvent, 'keyCode', { | |
| get : function() { |
| #!/usr/bin/env ruby | |
| require 'aws-sdk' | |
| require 'forwardable' | |
| DEFAULT_REGION = "us-east-1".freeze | |
| STACK_NAMES = ['market-dj'].freeze | |
| class Instance | |
| extend Forwardable |
| #!/usr/bin/env ruby | |
| `for i in market*.sh.erb; do echo $i; git log --format="%ad%x09%h%x09%s" --date=iso -- $i; done > history1.log` | |
| lines = File.readlines('history1.log') | |
| commits_by_file = lines.reduce(['', Hash.new([])]) { |(current_file, commits_by_file), line| line.include?("\t") ? [current_file, commits_by_file.merge(current_file => (commits_by_file[current_file] + [line]))] : [line, commits_by_file] }.last | |
| commits_by_file_parsed = Hash[commits_by_file.map{|file, commits| [file, commits.map{|c|c.split("\t")}.map{|s|{:date => s[0], :sha => s[1], :msg => s[2]}}]}] | |
| flat_commits = commits_by_file_parsed.flat_map{|file, commits| commits.map {|commit| commit.merge(:file => file)}} | |
| commits = flat_commits.reduce({}) { |mem, commit| new_commit = mem[commit[:sha]] ? mem[commit[:sha]].merge(:files => (mem[commit[:sha]][:files] + [commit[:file]])) : commit.select{|k| k != :file}.merge(:files => [commit[:file]]); mem.merge(commit[:sha] => new_commit) }.values.sort_by{|c| c[:date]} | |
| files = commits_by_file.keys |
| aws-vault exec customer -- aws rds describe-db-log-files --db-instance-identifier market-database-clustercluster-16apkpdp1bgkx-us-east-1a --region us-east-1 --query 'DescribeDBLogFiles[].LogFileName' --output text | tr '\t' '\n' | grep slowquery | while read file; do aws-vault exec customer -- aws rds download-db-log-file-portion --db-instance-identifier market-database-clustercluster-16apkpdp1bgkx-us-east-1a --region us-east-1 --log-file-name $file --output text >> slowlogs.log; done |
| SELECT | |
| r.trx_id as waiting_trx_id, | |
| r.trx_mysql_thread_id as waiting_thread, | |
| r.trx_query as waiting_query, | |
| b.trx_id as blocking_trx_id, | |
| b.trx_mysql_thread_id as blocking_thread, | |
| b.trx_query as blocking_query, | |
| bp.host as blocking_host, | |
| rp.host as waiting_host, | |
| bp.command as blocking_command, |
| defmodule MyApp.AuthController do | |
| use MyApp.Web, :controller | |
| # 1. I need that \\ default arg here. I guess I can live with this. Explicit deps, pure functions, why not. | |
| def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params, auth_service \\ MyApp.Auth) do | |
| case auth_service.sign_up_or_sign_in(auth) do | |
| {:ok, user} -> | |
| conn | |
| # 0. More of a problem with controller unit tests than with mocks, but still related as it's about isolation unit tests: | |
| # `#put_session` won't work here in my unit test |
I hereby claim:
To claim this, I am signing this object:
| ntpq -pn |
| select | |
| if(locate('PerformableMethod', s1) > 0, | |
| if(locate('method_name', s3) > 0, | |
| s3, | |
| s2 | |
| ), | |
| s1 | |
| ) s, | |
| sum(run_at <= now()) as total_waiting, -- date_add(now(), interval 8 hour)) | |
| min(priority), |