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
# 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 |
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
alias lint-all='git diff --name-only develop | grep "\.rb" | xargs rubocop -a' |
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
// 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; |
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
git branch --merged develop | grep -vE "master|develop" | xargs git branch -d |
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
# runs only changed specs | |
git status --porcelain | grep -v "D " | cut -c4- | grep "_spec\.rb" | xargs bundle exec rspec |
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
git status --porcelain | grep -v "D " | cut -c4- | grep "\.rb\|rake" | xargs rubocop -a |
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
# 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 |
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
(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) |
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
# why I use it so rarely? | |
args = [1,2,3] | |
a,b,c = args |
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
# map(&:id) is important to make this work | |
= f.association :stuff, disabled: Stuff.where(enabled: false).map(&:id) |