Skip to content

Instantly share code, notes, and snippets.

View zorbash's full-sized avatar
👨‍💻
'); DROP TABLE recruiters;

Dimitris Zorbas zorbash

👨‍💻
'); DROP TABLE recruiters;
View GitHub Profile
@zorbash
zorbash / sidekiq_retry_time.csv
Created May 28, 2021 12:48 — forked from marcotc/sidekiq_retry_time.csv
Sidekiq retry exponential backoff formula times
Retry count Retry Time Total Cumulative Time Total Cumulative Days
0 0:00:00 0:00:00 0.0
1 0:00:16 0:00:16 0.0
2 0:00:31 0:00:47 0.0
3 0:01:36 0:02:23 0.0
4 0:04:31 0:06:54 0.0
5 0:10:40 0:17:34 0.0
6 0:21:51 0:39:25 0.0
7 0:40:16 1:19:41 0.1
8 1:08:31 2:28:12 0.1
@zorbash
zorbash / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
require 'oauth2'
require 'net/http'
require 'json'
CID = 'my_cid'
PAS = 'my_pass'
RDR = 'rdr_url'
# OAuth2 client object
def client
#!/home/agorf/.rbenv/shims/ruby
require 'json'
workspaces = JSON.load(`i3-msg -t get_workspaces`)
num = ((1..10).to_a - workspaces.map {|w| w['num'] }).min
exec "i3-msg workspace #{num}"
# put this in /lib/resque.rb
require 'mail'
module Emailer
class Send
@queue = :issue_mailer
def self.perform(addressee, subject, body)
@zorbash
zorbash / env.rb
Created January 2, 2013 15:12 — forked from diago/env.rb
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV)
require 'rubygems'
require 'spork'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
@zorbash
zorbash / nginx.conf
Created December 18, 2012 01:57 — forked from mimosz/nginx.conf
# sudo ln -s ~/nginx.conf unicorn.conf
upstream app_server {
server unix:/tmp/unicorn_padrino.sock fail_timeout=0;
}
server {
listen 80;
charset utf-8;
server_name db.innshine.com;
@zorbash
zorbash / dabblet.css
Created February 17, 2012 15:58 — forked from LeaVerou/dabblet.css
Move in a circle without wrapper elements
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);