Skip to content

Instantly share code, notes, and snippets.

This happens when I clone one of my forks:
% git push -u origin master
fatal: remote error:
You can't push to git://github.com/dbb/vim-pathogen.git
Use [email protected]:dbb/vim-pathogen.git
% git remote add origin [email protected]:dbb/vim-pathogen.git
fatal: remote origin already exists.
#!/usr/bin/perl
use strict;
use warnings;
my $num = $ARGV[0] // 0;
my $to = $ARGV[1] // 'd';
$num = oct($num) if $num =~ /^0/;
printf '%b', $num if $to eq 'b';
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Getopt::Std;
my $opts = { };
getopts('bdho', $opts);
package HackerNews;
{
## this is a rough draft
## https://github.com/dbb/hackernews-parser
use strict;
use warnings;
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
<b:if cond='data:blog.isMobile'>
<meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/>
<b:else/>
<meta content='width=1100' name='viewport'/>
</b:if>
@dbb
dbb / stripper.pl
Created December 6, 2011 04:59
HTML stripper for the Wiktionary
#!/usr/bin/env perl
# https://github.com/dbb
use strict;
use warnings;
use 5.010;
my $url = 'https://en.wiktionary.org/wiki/' . $ARGV[0];
my $text = `curl $url`;
realtek high definition audio
5.10.0.6482
@dbb
dbb / wv_congress.txt
Created January 18, 2012 19:20
WV Congress Members
Name Phone Fax Web Twitter
Senate
-----------------------------------------------------------------------------------------------------------
Jay Rockefeller 202-224-6472 202-224-7665 http://rockefeller.senate.gov/ N/A
Joe Manchin 202-224-3954 202-228-0002 http://manchin.senate.gov/ @Sen_JoeManchin
House
-----
David McKinley 202-225-4172 202-225-7564 http://mckinley.house.gov/ @RepMcKinley
@dbb
dbb / cat.pl
Created March 20, 2012 00:33
cat_algorithm
# Program to emulate the feline brain
if ( $smaller_than_you ) {
if ( $moving ) { attack() }
else { ignore() }
}
if ( $bigger_than_you ) {
if ( $moving ) {
if ( $human ) { meow() while (1) }
@dbb
dbb / new_repo.sh
Created April 19, 2012 00:07
Create a new Github repository from the command line using cURL
curl -F login=$( git config github.user ) -F token=$( git config github.token ) https://github.com/api/v2/yaml/repos/create -F name=$1