Skip to content

Instantly share code, notes, and snippets.

View gist:646666
package no.ntnu.tdt4237.helperactions;
public class StringHelpers {
public static String getBlogOwnerName(String url)
{
return urlToString(url).replaceFirst("http?://.*/blog/","");
}
public static String getProfileOwnerName(String url)
@norrs
norrs / PKI-gpg question.txt
Created Nov 24, 2010
PKI-gpg question.txt
View PKI-gpg question.txt
21:01:46 Rockj | Hey, anyone around who could assist me in using GPG?
21:02:25 Rockj | I've used GPG and have setup a pair and made my public key available on key servers.. and I know how to setup my email client so it works...
21:02:53 Rockj | but I have a problem, I would like to start using GPG at work... but as everyone know, you should hide and keep your secret key secret and hidden in
| the shadows out of everyone's reach
21:03:55 Rockj | now, I've stored my private key on an encrypted usb pen drive (LUKS)... problem is that I'm using OS X at work, which basically can't mount up LUKS
| encrypted volumes....
21:04:19 Rockj | I've heard something about generating a sub-pair or something, which I think you could mark as TRUSTED in your master-pair?
21:05:14 Rockj | so incase work-pair is no longer a trusted source for identifying me (coworker stole it, or someone stole laptop etc etc) , I could simply revoke
| just my work-pair and assign a new one and mark it a
@norrs
norrs / rom.txt
Created Jan 2, 2011
contents of rom.zip inside RRU htc hero
View rom.txt
| Directory of C:\rom
02.01.2011 01:05 <DIR> .
02.01.2011 01:05 <DIR> ..
27.08.2009 09:57 237 android-info.txt
27.08.2009 11:00 1 781 760 boot.img
04.08.2009 19:47 524 288 hboot_7200A_1.76.0007_090804.nb0
27.08.2009 11:00 21 889 024 radio.img
27.08.2009 11:00 2 017 280 recovery.img
02.08.2009 04:00 307 200 splash1_Hero_320x480.nb0
View gist:762143
C:\Program Files\Android\android-sdk-windows\tools>fastboot.exe boot C:\rom\reco
very.img
downloading 'boot.img'... FAILED (remote: not allow)
finished. total time: 0.002s
View dkill.pl
#!/usr/bin/perl
## dotkom kill, dkill.pl
## Roy Sindre Norangshol, <norangsh>
use Getopt::Std;
use strict;
use vars qw/ %opt /;
my $MAX_HOURS = 4;
View gist:1904295
Bind zone files:
Always fetch latest zonefile from files/ in dns::server module and put it in /tmp/
Always run named-checkzone on zonefile in /tmp/ , report with loglevel > info IF errors. Silent if not.
Copy zonefile from /tmp/ to bind directory where it should be if no complaints from named-checkzone
and refresh zonefile with rndc reload.
Problem with loglevel => info :
@norrs
norrs / server.pp
Created Feb 25, 2012
Ugly ugly ugly ugly hacks on puppet
View server.pp
define zonefile() {
if $name!="" and $name!="," {
file { "tmp.db.$name":
path => "/tmp/$title",
owner => "bind",
group => "bind",
mode => "0644",
source => "puppet:///modules/dns/db.$title",
require => File["/etc/bind/db.d"],
View gist:1959303
Feb 28 03:20:44 fernet kernel: [2471192.348623] ------------[ cut here ]------------
Feb 28 03:20:44 fernet kernel: [2471192.348636] WARNING: at /build/buildd-linux-2.6_2.6.32-41-amd64-ReqhZF/linux-2.6-2.6.32/debian/build/source_amd64_none/fs/fs-writeback.c:588 writeback_inodes_wb+0x36b/0x4ff()
Feb 28 03:20:44 fernet kernel: [2471192.348642] Hardware name: System Product Name
Feb 28 03:20:44 fernet kernel: [2471192.348645] Modules linked in: tun xt_multiport iptable_filter ip_tables x_tables nfsd nfs lockd fscache nfs_acl auth_rpcgss sunrpc ext3 jbd mbcache hwmon_vid loop firewire_sbp2 snd_hda_codec_analog snd_
hda_intel snd_hda_codec nouveau evdev psmouse snd_hwdep ttm drm_kms_helper snd_pcm snd_timer serio_raw parport_pc pcspkr drm parport edac_core i2c_algo_bit k8temp edac_mce_amd snd soundcore asus_atk0110 i2c_nforce2 snd_page_alloc i2c_core
button processor xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx raid1 md_mod sd_mod crc_t10dif ohci_hcd ata_generic fir
You can’t perform that action at this time.