Skip to content

Instantly share code, notes, and snippets.

View jnbek's full-sized avatar

John D Jones III jnbek

View GitHub Profile
#! /usr/bin/perl
use strict;
use warnings;
use utf8;
use IO::Socket::INET6;
use LWP::UserAgent;
## Use IO::Socket::INET6 instead of IO::Socket::INET6 in Net::HTTP.
BEGIN {
@jnbek
jnbek / PKGBUILD
Created September 26, 2014 21:11
amispammer PKGBUILD
# Contributor: Zerial <fernando@zerial.org>
# Contributor: John D Jones III <jnbek1972@$googleemailservice__DOT__com>
pkgname=amispammer
pkgver=3.3
pkgrel=1
pkgdesc="Powerful mail server checker on blacklists. Am I spammer?"
arch=('any')
url="http://www.lorenzomartinez.es/projs/amispammer/"
license=('GPL')
@jnbek
jnbek / gist:a47f7a9582bb208ac19a
Created May 9, 2015 22:46
C++ Web/HTML/JSON links
http://ctpp.havoc.ru/doc/en/
https://developer.gnome.org/libsoup/stable/libsoup-client-howto.html
https://wiki.gnome.org/action/show/Projects/JsonGlib?action=show&redirect=JsonGlib
@jnbek
jnbek / PKGBUILD
Created May 11, 2015 22:01
namespace-autoclean
# Contributor: John D Jones III AKA jnbek <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator : CPANPLUS::Dist::Arch 1.30
pkgname='perl-namespace-autoclean'
pkgver='0.24'
pkgrel='1'
pkgdesc="Keep imports out of your namespace"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
@jnbek
jnbek / hello_web.go
Created May 29, 2015 19:31
Hello World in Go
package main
import (
"github.com/hoisie/web"
"github.com/gorilla/mux"
)
func hello(val string) string { return "hello " + val }
func main() {
#!/bin/sh
#
# PROVIDE: plack_app
# REQUIRE: LOGIN
# BEFORE: cron
#
# Add the following lines to /etc/rc.conf to enable the webapp:
# plack_app_enable (bool): Set to "NO" by default.

Keybase proof

I hereby claim:

  • I am jnbek on github.
  • I am jnbek (https://keybase.io/jnbek) on keybase.
  • I have a public key whose fingerprint is F6B7 4633 09AB 0DE0 A9CD 30C0 71C5 33A9 676D 2A2D

To claim this, I am signing this object:

@jnbek
jnbek / wheaty.rc.d
Created September 18, 2015 16:52
Wheaty freebsd rc.d startup script
#!/bin/sh
#
# $FreeBSD: ports/graphics/wheaty/files/wheaty.in,v 1.4 2012/01/14 08:55:46 dougb Exp $
#
# PROVIDE: wheaty
# REQUIRE: NETWORKING
#
# Add the following line to /etc/rc.conf[.local] to enable wheaty
#
# wheaty_enable (bool): Set to "NO" by default.
@jnbek
jnbek / CutyCapt-jail.sh
Created December 20, 2010 01:28
Speedy Install for CutyCapt in a FreeBSD jail
echo "nameserver 192.168.0.1" > /etc/resolv.conf
mkdir ~/bin
mkdir ~/build
cd ~/build
pkg_add -r bash portupgrade vim-lite xorg-vfbserver jpeg qt4-imageformats qt4-qmake qt4-moc qt4-webkit qt4-svg subversion xkeyboard-config xkbcomp
chsh -s /usr/local/bin/bash root
/usr/local/bin/svn co --trust-server-cert --non-interactive https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
cd cutycapt/CutyCapt
/usr/local/bin/qmake-qt4
make
@jnbek
jnbek / openpipes
Created December 20, 2010 02:01
Working example with using open and pipes for external program execution.
perl -e'open my $PROG, "-|", "ls -hal"; while (<$PROG>) { print $_; } close $PROG;'