Skip to content

Instantly share code, notes, and snippets.

@saitoha
Created August 19, 2013 16:05
Show Gist options
  • Select an option

  • Save saitoha/6270806 to your computer and use it in GitHub Desktop.

Select an option

Save saitoha/6270806 to your computer and use it in GitHub Desktop.
diff -r fd6fcb6dd914 lib/tw/app/render.rb
--- a/lib/tw/app/render.rb Mon Aug 19 20:09:42 2013 +0900
+++ b/lib/tw/app/render.rb Tue Aug 20 01:03:00 2013 +0900
@@ -48,7 +48,7 @@
imgfile = cachedir + "/#{m.user}"
until FileTest.exist?(imgfile) do
img_url = Twitter.user(m.user).profile_image_url
- system("curl -k -s #{img_url} | convert -resize #{iconsize}x#{iconsize} - -colors 256 ppm:- | ppmtosixel 2>/dev/null | tr -d '\n' > #{imgfile}")
+ system("curl -k -s #{img_url} | convert -resize #{iconsize}x#{iconsize} - -colors 256 ppm:- | ppmtosixel 2>/dev/null | LC_ALL=C tr -d '\n' > #{imgfile}")
end
File::open(imgfile) {|f|
f.each {|line| print line}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment