Skip to content

Instantly share code, notes, and snippets.

@poppen
poppen / gist:357166
Created April 6, 2010 02:50
oneliner
perl -ane 'BEGIN { $\="," } print $F[2] unless /^$/' /tmp/hoge.txt
ls | perl -MFile::Copy -ne 'chomp $_; copy("/Users/poppen/repos/vimperator-plugins/trunk/$_", "$_"); print $_, "\n"'
sed -n '3,$p' hoge.csv | nkf -Sw | perl -F, -anle '{print "$F[3],$F[5]"}'
rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf | perl -F'-' -ane '{chmod $_; @l = @F[0,-5]; $s = join("-",@l); $s =~ s/\-$//; print $s, "\n" }'
rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf | perl -F'-' -ane '{chmod $_; @l = @F[0,-5]; $s = join("-",@l); $s =~ s/\-$//; system "yumdownloader --destdir /var/tmp $s" }'
rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf | perl -ne '{chomp $_; $_ =~ /^(.*?)\-[0-9]/; system "sudo yum remove $1" }'
program hello
print *, 'Hello World!'
end program hello
#!/usr/bin/env perl
use strict;
use warnings;
use 5.012;
use Config::Pit;
use LWP::Simple;
use XML::Simple;
use URI::Escape;
@poppen
poppen / a.txt
Created September 1, 2010 02:57
Index: trunk/twissr.js
===================================================================
--- trunk/twissr.js (revision 38395)
+++ trunk/twissr.js (working copy)
@@ -1,5 +1,5 @@
// Vimperator plugin: "Update Twitter & Wassr"
-// Last Change: 20-Oct-2008. Jan 2008
+// Last Change: 01-Sep-2010. Jan 2008
// License: Public domain
// Maintainer: mattn <[email protected]> - http://mattn.kaoriya.net/
@poppen
poppen / i18n.rb.patch
Created September 10, 2010 01:12
patch for locale_rails-2.0.4
--- i18n.rb.orig 2010-09-10 10:06:32.000000000 +0900
+++ i18n.rb 2010-09-10 10:07:16.000000000 +0900
@@ -14,35 +14,35 @@
# Gets the supported locales.
def supported_locales
- Locale.app_language_tags
+ ::Locale.app_language_tags
end