Skip to content

Instantly share code, notes, and snippets.

View pahanix's full-sized avatar

Pavel Gorbokon pahanix

View GitHub Profile
#...
# Nav
alias l='ls -CF'
## Dev
# Rails
alias ss='script/server --debugger'
alias sc='script/console --debugger'
alias sg='script/generate'
alias sd='script/destroy'
#...
# Nav
alias l='ls -CF'
## Dev
# Rails
alias ss='script/server --debugger'
alias sc='script/console --debugger'
alias sg='script/generate'
alias sd='script/destroy'
@pahanix
pahanix / gist:885671
Created March 24, 2011 19:22
Clear your logs in development automatically when they are too large.
# config/initializers/clear_logs.rb
# This snippet simply clears your logs when they are too large.
# Large logs mean looooong search in TextMate. You know it :)
# Every time you run rails server or rails console it checks log sizes
# and clears the logs for you if necessary.
if Rails.env.development?
MAX_LOG_SIZE = 2.megabytes
@pahanix
pahanix / gist:1029826
Created June 16, 2011 17:59
Javascript Bookmarklet для мгновенного удаления комментов неугодного ЖЖ юзера (заменить ****** на ник нужного ЖЖ юзера)
javascript:(function(){var%20BLJU="******";%20var%20a%20=%20new%20Array;%20allSpans%20=%20document.getElementsByTagName("span");%20for%20(i=0;%20i<allSpans.length;%20i++)%20%20{%20if%20((allSpans[i].className.indexOf("ljuser")%20>%20-1)%20&&%20allSpans[i].getAttribute("lj:user")%20==%20BLJU)%20{%20a.push(allSpans[i].parentNode.parentNode.parentNode.parentNode)%20}};%20for%20(i=0;%20i<a.length;%20i++)%20{%20if%20(a[i].className.indexOf("comment-wrap")%20>%20-1)%20{%20a[i].style.display%20=%20"none"}%20};})();
@pahanix
pahanix / imagemagick.md
Last active November 28, 2017 18:06
ImageMagick High Sierra

I have just encountered and solved this issue on a new Mac running Sierra. There seems to be no solution for ImageMagick 7 at this time.

Uninstall existing imagemagick if needed Install version 6:

brew install imagemagick@6

Since this is keg-only, you should then force-link it: