I hereby claim:
- I am olegykz on github.
- I am olegykz (https://keybase.io/olegykz) on keybase.
- I have a public key ASAvG5YrqKDgV2Cg6CmhCdUT_EUKVw5dg6D_3Amd1Difbgo
To claim this, I am signing this object:
require 'pry' | |
require 'vkontakte_client' | |
require 'cgi' | |
require 'watir' | |
CLIENT_ID = 1234567 | |
l = Logger.new("#{Time.now.to_i}.log") | |
redirect_uri = CGI.escape('https://oauth.vk.com/blank.html') |
#!/usr/bin/env ruby | |
require 'watir' | |
require 'logger' | |
require 'pry' | |
require 'telegram/bot' | |
TOKEN = '<TG_TOKEN>' | |
CHAT_ID = -12345678 |
# taken from https://stackoverflow.com/a/46003664/1300195 | |
queue_name = 'my_queue' | |
jobs = Resque.data_store.peek_in_queue(queue_name, 0, 500_000); | |
deleted_count = 0 | |
jobs.each do |job| | |
decoded_job = Resque.decode(job) | |
if decoded_job['class'] == 'ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper' && | |
decoded_job['args'].first.fetch('job_class') == 'MyClass' |
I hereby claim:
To claim this, I am signing this object:
R1: 1, R2: 1 | |
R1: 2, R2: 2 | |
R1: 3, R2: 3 | |
R1: 4, R2: 4 | |
R1: 5, R2: 5 | |
R1: 6, R2: 6 | |
R1: 7, R2: 7 | |
R1: 8, R2: 8 | |
R1: 9, R2: 9 | |
R1: 10, R2: 10 |
# dump | |
# Betaflight / SPRACINGF3 3.1.7 Apr 3 2017 / 22:27:23 (e1c4b5c) | |
name - | |
resource BEEPER 1 C15 | |
resource MOTOR 1 A06 | |
resource MOTOR 2 A07 | |
resource MOTOR 3 A11 | |
resource MOTOR 4 A12 | |
resource MOTOR 5 B08 |
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
require 'benchmark' | |
def require_and_profile(gemname = nil) | |
unless gemname | |
puts "%-20s: %10s | %10s | %10s" % ['gem','increment','total','time'] | |
return | |
end | |
# checked on procps-ng (ps) version 3.3.3 and 3.3.9 | |
memory_usage = `ps -o rss= -p #{Process.pid}`.to_i / 1024.0 |
namespace :rails do | |
desc 'Open a rails console `cap [staging] rails:console [server_index default: 0]`' | |
task :console do | |
on roles(:app) do |server| | |
return if server != roles(:app)[ARGV[2].to_i] | |
puts "Opening a console on: #{host}...." | |
cmd = "ssh #{fetch(:ssh_options)[:user]}@#{host} -t 'source \"$HOME/.rvm/scripts/rvm\""\ | |
" && cd #{fetch(:deploy_to)}/current && RAILS_ENV=#{fetch(:rails_env)} bundle exec rails console'" |
[user] | |
name = **** | |
email = **** | |
[github] | |
user = **** | |
token = **** | |
[color] | |
branch = auto | |
diff = auto | |
status = auto |