Skip to content

Instantly share code, notes, and snippets.

View everm1nd's full-sized avatar

Nikita Simakov everm1nd

  • Berlin
View GitHub Profile
# this will add some fades 10ms for fade-in and 100ms for fade-out. probably fade out is too extreme
for i in $(ls *.wav); do sox $i $i.ogg fade .01 -0 0.1; done
# this will normalize volume to -3 dB level
for i in $(ls *.wav); do sox $i $i.ogg norm -3; done
@everm1nd
everm1nd / lint.sh
Last active July 31, 2019 12:42
Rubocop all the files changed in the current branch
alias lint-all='git diff --name-only develop | grep "\.rb" | xargs rubocop -a'
@everm1nd
everm1nd / harmonograph.pde
Created March 24, 2017 14:37 — forked from tsulej/harmonograph.pde
Harmonograph + noise
// http://generateme.tumblr.com
// Harmonograph with noise
// space - save
// click - change
float time;
float f1,f2,f3,f4;
float p1,p2,p3,p4;
float a1,a2,a3,a4;
@everm1nd
everm1nd / git-branch-clean
Created March 1, 2017 16:33
Clean merged branches
git branch --merged develop | grep -vE "master|develop" | xargs git branch -d
@everm1nd
everm1nd / fast-specs.sh
Created February 27, 2017 14:11
Fast specs
# runs only changed specs
git status --porcelain | grep -v "D " | cut -c4- | grep "_spec\.rb" | xargs bundle exec rspec
@everm1nd
everm1nd / rubocop.sh
Last active January 8, 2020 04:31
Run Rubocop locally for changed files only
git status --porcelain | grep -v "D " | cut -c4- | grep "\.rb\|rake" | xargs rubocop -a
@everm1nd
everm1nd / vagrant-halt-hard.sh
Created September 6, 2016 10:42
Kill VBoxHeadless process in a hard way
# this is quite useful when Vagrant hangs and have no response for your commands via CLI
if [[ $(pgrep VBoxHeadless) ]]; then
echo 'Found VBoxHeadless processes:'
pgrep VBoxHeadless
echo 'Terminating...'
pkill -9 VBoxHeadless
if [[ $(pgrep VBoxHeadless) ]]; then
echo 'Still found VBoxHeadless running. Check this PIDs:'
pgrep VBoxHeadless
else
(1) - fix bugs
- non-muting drums
(3) - fix performance issues
- reduce events amount (using calculation of delta since last frame - buffer)
(1) - add instruments
(now we have drums(kick/snare), monosynth, bassline)
we can add samples
(3) - add visual effects to server
(2) - server uses x-axis value as octave/filter/modulation (and y for volume, already implemented)
@everm1nd
everm1nd / multiple.rb
Created April 11, 2016 10:09
Multiple assignment
# why I use it so rarely?
args = [1,2,3]
a,b,c = args
@everm1nd
everm1nd / disable.rb
Created August 11, 2015 13:32
How to disable some select options in SimpleForm association
# map(&:id) is important to make this work
= f.association :stuff, disabled: Stuff.where(enabled: false).map(&:id)