SELECT
concat(date(created_at), ' ', LPAD(hour(created_at), 2, '0'), '-', LPAD(IF(hour(created_at)=23, 0, hour(created_at)+1), 2, '0')) as time_slice,
count(*) as '# entries'
FROM entries
GROUP BY time_slice
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
require 'rails_helper' | |
RSpec.describe "your favorite app" do | |
it 'boots' do | |
assert_nil Rails.application.eager_load! | |
end | |
context 'sidekiq server' do | |
it 'boots too!' do | |
allow(Sidekiq).to receive(:server?).and_return true |
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
interface StatusRequestBody { | |
query: { | |
match: { status_id: string }; | |
}; | |
} | |
await new Promise(resolve => setTimeout(resolve, 500)); | |
return new Promise<void>((resolve, reject) => { | |
this.client.quit(); |
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
gunzip < dump.sql.gz | sed -n -e '/DROP TABLE.*`my_table`/,/UNLOCK TABLES/p' > my_table.sql |
module Mod
def x
puts "x"
end
end
class C1
extend Mod
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
cat /etc/lsb-release | |
sudo apt autoremove | |
sudo apt update && sudo apt upgrade | |
sudo apt-cache search | |
apt-cache show | |
sudo apt-get install --reinstall apparmor apparmor-profiles apparmor-utils | |
sudo ntpdate il.pool.ntp.org | |
grep microcode /proc/cpuinfo |
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 | |
require 'optparse' | |
require 'digest/sha1' | |
require 'data_mapper' | |
FILE_STDIN = '/dev/stdin'.freeze | |
def debug_log(msg) | |
puts msg |
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 | |
# Usage: | |
# for f in $(find . -type f); do ./chunker.rb -k "$f" < "$f"; done | |
require 'optparse' | |
require 'digest/sha1' | |
require 'data_mapper' | |
CHUNK_SIZE = 1 << 13 # 8192 |
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
Sem varius curabitur a fermentum. Consectetuer ac nisl hendrerit nunc hac interdum, cras possimus, lobortis turpis laoreet, potenti pharetra ut tortor rhoncus vitae dui, rutrum euismod senectus dignissim. Nibh et mauris, condimentum nonummy convallis id tortor erat, dui malesuada aliquip montes arcu. : ̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿|̳̳̳̳̿̿̿̿l̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿|̳̳̳̳̿̿̿̿l̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̳̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊̿̿̿̿̊ é̴̛̛̿͒̾̑̌̆̀̎͋̀̈́̓̓̄̂́̃̀̈́̋̎̎͌̈́̓͘̚͝ |
NewerOlder