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
#!/usr/bin/env perl | |
use warnings; | |
use autodie; | |
use strict; | |
use feature qw#say#; | |
use Curses::UI; | |
use File::Find; | |
use vars qw#*name#; |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Curses; | |
use Curses::UI; | |
my $cui = Curses::UI->new( | |
-color_support => 1, | |
-clear_on_exit => 1 |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Curses; | |
use Curses::UI; | |
my $cui = Curses::UI->new( | |
-color_support => 1, | |
-clear_on_exit => 1 |
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
#!/usr/bin/env python3 | |
import urwid | |
from urwid import MainLoop | |
import time | |
import sys | |
import os | |
PALETTE = [ | |
('s1_titlebar', 'white,bold', 'yellow'), | |
('s2_titlebar', 'white,bold', 'light green'), |
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
class Clazz { | |
static List<String> elements = ["foo", "bar"]; | |
} | |
void main() { | |
var n = Clazz.elements; | |
for (int i = 0; i < n.length; i++) { | |
print(n[i]); | |
} | |
} |
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
#!/usr/bin/env bash | |
tmpfile=$(mktemp /tmp/blkid2fstab.XXXXXX) | |
blkid -o list | while read -r l; do | |
[[ ! ${l} =~ (^/dev/sd) ]] && continue | |
IFS=" " read -a line <<< "${l}" | |
fs="${line[1]}" | |
mountpt="${line[2]}" | |
uuid="UUID=${line[3]}" |
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
package org.gentoo.java; | |
import static org.objectweb.asm.Opcodes.ACC_PUBLIC; | |
import static org.objectweb.asm.Opcodes.ACC_STATIC; | |
import static org.objectweb.asm.Opcodes.ACC_SUPER; | |
import static org.objectweb.asm.Opcodes.ALOAD; | |
import static org.objectweb.asm.Opcodes.ATHROW; | |
import static org.objectweb.asm.Opcodes.INVOKESPECIAL; | |
import static org.objectweb.asm.Opcodes.RETURN; | |
import static org.objectweb.asm.Opcodes.V1_5; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2, random | |
from xml.etree import ElementTree | |
# Turn an XML document into a string. | |
def fetch_document(my_url): | |
return [l.strip() for l in urllib2.urlopen(my_url).readlines()] | |
def main(): |
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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use Term::ANSIScreen qw/cls/; | |
use POSIX qw/strftime/; | |
use feature 'say'; | |
# Current year. | |
my $year = strftime '%Y', gmtime; |
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
--- /usr/bin/echangelog 2014-11-02 17:34:41.730843075 +0100 | |
+++ echangelog 2014-11-02 22:10:13.524146598 +0100 | |
@@ -108,17 +108,14 @@ | |
exit 0; | |
} | |
-sub getenv($) { | |
+sub getenv ($) { | |
my $key = shift; | |
+ my $env = $ENV{$key}; |
NewerOlder