Skip to content

Instantly share code, notes, and snippets.

/** \mainpage
*
* __NaCl__ (pronounced _salt_) is a new easy-to-use high-speed
* software library for network communication, encryption, decryption,
* signatures, etc. NaCl's goal is to provide all of the core
* operations needed to build higher-level cryptographic tools.
*
* __Sodium__ is a portable, cross-compilable, installable,
* packageable, API-compatible version of NaCl.
*
use Irssi;
use POSIX;
use JSON;
use vars qw($IRSSI);
%IRSSI = (
name => "awayforward",
license => "Public Domain",
);
@jpmens
jpmens / ca-bundle.pem
Last active September 8, 2015 12:34 — forked from cunnie/ca-bundle.pem
*.sslip.io SSL key, certificate, and CA chain (ca-bundle)
-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQwMjEy
MDAwMDAwWhcNMjkwMjExMjM1OTU5WjCBkDELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZh
bGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAI7CAhnhoFmk6zg1jSz9AdDTScBkxwtiBUUWOqigwAwCfx3M28Sh
@jpmens
jpmens / json.pl
Created July 28, 2011 13:08 — forked from mschmitt/json.pl
Playing with the Firefox session file...
#!/usr/bin/perl -w
use strict;
use diagnostics;
use JSON;
use Data::Dumper;
my $sessionstore = '/home/martin/.mozilla/firefox/12345678.default/sessionstore.js';
my $json_raw;
open my $fh_in, "<$sessionstore" or die "Can't open $sessionstore: $!\n";
@jpmens
jpmens / gist:1489841
Created December 17, 2011 10:00 — forked from jakedouglas/gist:135109
Simple UDP Growl packets in Lua
require "luarocks.require"
require "pack"
require "socket"
require "md5"
Growl = {version = 1, registration = 0, notification = 1}
function Growl.new(hostname, appname)
local mysock = assert(socket.udp())
#define UNBOUND_CONTROL_VERSION 1
#define UNBOUND_ETC_DIR "/var/unbound/etc"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
@jpmens
jpmens / withings.py
Created January 26, 2012 14:16 — forked from gregorynicholas/withings.py
Withings Python OAuth Wrapper
# -*- coding: utf-8 -*-
# Based on https://github.com/ikasamah/withings-garmin/blob/master/withings.py
import urllib
from datetime import datetime
import urlparse
import oauth2 as oauth
try:
import json
@jpmens
jpmens / gist:2145573
Created March 21, 2012 08:20 — forked from mkyed/gist:1694240
Installing PowerDNS 3.0.1 on Mac OS X Lion
1) Install MySQL <http://dev.mysql.com/>
2) Install Homebrew <http://mxcl.github.com/homebrew/>
3) $ brew install boost boost-jam lua pkg-config wget
4) $ wget http://downloads.powerdns.com/releases/pdns-3.0.1.tar.gz && tar xzf pdns-3.0.1.tar.gz
5) $ cd pdns-3.0.1 && ./configure --with-mysql-includes=/usr/local/mysql/include && make && make install
6) Adjust /usr/local/etc/pdns.conf to your mysql setup
7) cat /System/Library/LaunchDaemons/pdns_server.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@jpmens
jpmens / .gitignore
Created April 13, 2012 10:02 — forked from eatnumber1/.gitignore
NSD OpenDNSSEC Notifier
nsd-notify
@jpmens
jpmens / tmp_files
Created June 14, 2012 10:01 — forked from tomoconnor/tmp_files
Very simple example munin plugin
#!/usr/bin/env python
import os
from munin import MuninPlugin
class TmpFileCount(MuninPlugin):
title = "Number of Files in /tmp"
args = "--base 1000 -l 0"
vlabel = "files"
scaled = False