Skip to content

Instantly share code, notes, and snippets.

View jnbek's full-sized avatar

John D Jones III jnbek

View GitHub Profile
@jnbek
jnbek / xslt.pl
Created December 22, 2016 00:49
xsltproc vs perl
#!/usr/bin/env perl
use strict;
use warnings;
use XML::LibXSLT;
use XML::LibXML;
use Data::Dumper;
(bless {}, __PACKAGE__)->main();
@jnbek
jnbek / nginx.vhost
Created December 18, 2016 23:43 — forked from vedovelli/nginx.vhost
server {
listen 80;
server_name CHANGEME.app;
root /var/www/vhosts/CHANGEME.app/public;
index index.html index.htm index.php;
charset utf-8;
location / {
@jnbek
jnbek / gist:4777af1763ef19d138e844a9ded253c4
Created November 28, 2016 15:59
Fix Alt_Tab on MATE...
dconf write /org/mate/marco/general/compositing-fast-alt-tab false
([J:1]jnbek@ecclesiastes3[/tmp/perl-moose]% pacman -Qm | wc [06/07/16][8:17:47])
870 1740 24125
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
#!/usr/bin/perl -w
use strict;
use warnings;
use Env qw(HOME);
use MP3::Info;
use File::Find ();
use Data::Dumper;
#my $icy = MP3::Icecast->new;
use vars qw/*name *dir *prune/;
@jnbek
jnbek / PKGBUILD
Created April 24, 2016 23:13
perl-dbix-contextualfetch PKGBUILD updated
kgname='perl-dbix-contextualfetch'
pkgver='1.03'
pkgrel='1'
pkgdesc="Add contextual fetches to DBI"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-dbi>=1.35')
makedepends=()
url='https://metacpan.org/release/DBIx-ContextualFetch'
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Dir;
use Data::Dumper;
( bless {}, __PACKAGE__ )->main();
sub main {
my $self = shift;
@jnbek
jnbek / csv.c
Created March 30, 2016 23:56
Tiny CSV Reader
/* Tiny CSV Reader */
/* Copyright (C) 2015, Deligiannidis Konstantinos
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@jnbek
jnbek / freebsd_defaults.txt
Created March 27, 2016 22:06
A debate about 'bad' FreeBSD defaults
https://vez.mrsk.me/freebsd-defaults.txt
#########################################################################
# FreeBSD - a lesson in poor defaults #
# Last updated 3/19/2016 #
# https://twitter.com/blakkheim #
#########################################################################
00) Intro