Skip to content

Instantly share code, notes, and snippets.

@Eugene-Shapovalov
Eugene-Shapovalov / aequei7N.csv
Last active December 11, 2018 16:07
aequei7N
45181163 45191822 45194318 45203588 45221165 45227180 45228461 45233054 45235193 45253508 45269009 45279326 45292985 45316526 45327512 45341885 45352253 45353420 45356765 45367514 45367769 45386468 45393785 45419471 45433595 45435464
@Eugene-Shapovalov
Eugene-Shapovalov / jenkins_rvm.Dockerfile
Created January 10, 2018 16:28 — forked from nickgnd/jenkins_rvm.Dockerfile
Jenkins and RVM with Ruby 2.2.3 - Docker image
# v1.0
# November 21, 2015
FROM jenkins:latest
MAINTAINER NickGnd "[email protected]"
# https://github.com/jenkinsci/docker/blob/4fa9ebc13069fa8186728622cd63702cddf11162/Dockerfile
ENV RUBY_VERSION 2.2.3
# --handlerCountStartup = set the no of worker threads to spawn at startup. Default is 5
@Eugene-Shapovalov
Eugene-Shapovalov / sidekiq.rb
Created September 18, 2017 15:25
Sidekiq tips
Sidekiq.redis {|c| c.del('stat:failed') } # Clear failed jobs
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
# This file corresponds to a single Sidekiq process. Add multiple copies
for f in *.log; do > $f; done
@Eugene-Shapovalov
Eugene-Shapovalov / exs.rb
Last active March 2, 2016 13:32
Ruby examples
Array.new(10) { rand 300 } #=> [217, 232, 274, 141, 157, 180, 11, 193, 66, 187]
[].methods.grep /^re.*/ # => array of matched methods
# All to boolean
!!(4) # => true
!!(nil) # false
# Different ways to call a lambda
my_lambda = -> { puts 'Hello' }
@Eugene-Shapovalov
Eugene-Shapovalov / .bash_aliases
Created February 24, 2015 10:28
.bash_aliases
# Rails
alias be='bundle exec'
alias bers='be rails server'
alias berk='be rake'
alias berc='be rails c'
# Utils
alias hgrep='history | grep'
#!/bin/sh
for ape in *.ape;
do
ffmpeg -i "$ape" -ab 192k "${ape%.*}".mp3
done
#mp3splt -c audiotrack.cue audiotrack.mp3
@Eugene-Shapovalov
Eugene-Shapovalov / flac3mp3.sh
Last active August 29, 2015 14:01
flac2mp3
#!/bin/sh
for flac in *.flac;
do
wav="${flac%.*}".wav
# convert 2 wav
flac -d "$flac"
# convert 2 mp3 vbr max
lame -V 0 -h "$wav"
rm "$wav"
@Eugene-Shapovalov
Eugene-Shapovalov / gist:4976771
Created February 18, 2013 11:36
Rails dev env conf
# exclude docs and ri
echo 'gem: --no-ri --no-rdoc' >> ~/.gemrc
# rspec conf
echo '--colour --format documentation' > .rspec
# Git
echo 'test' >> .gitignore
echo '*.swp' >> .gitignore
echo '.DS_Store' >> .gitignore