Skip to content

Instantly share code, notes, and snippets.

import os
import json
struct Signature {
name string
usage string
extra_usage string
required_positional []string
optional_positional []string
named []string
@cygnetix
cygnetix / check_port.v
Created May 30, 2022 03:37
Just playing around with https://vlang.io
import net
import flag
import os
enum Nagios {
ok
warning
critical
unknown
}
@cygnetix
cygnetix / err-pushover.plug
Last active August 20, 2016 10:59
Pushover Command for ErrBot
[Core]
Name = Pushover
Module = err-pushover
[Python]
Version=2+
[Documentation]
Description = Sends commands to mobile phones using the pushover.net API
@cygnetix
cygnetix / go_scp.go
Created October 7, 2015 05:34 — forked from jedy/go_scp.go
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@cygnetix
cygnetix / .tmux.conf
Created August 23, 2015 08:13
tmux configuration file
# use ctrl+a instead of ctrl+b
unbind C-b
set -g prefix C-a
bind a send-prefix
# allow tmux to be reloaded
unbind r
bind r source-file ~/.tmux.conf
# set colours
@cygnetix
cygnetix / .emacs
Created August 23, 2015 07:52
Email configuration file
(setq backup-directory-alist `(("." . "~/.saves")))
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(menu-bar-mode -1)
(load-theme 'wombat)
## Resolves known issue with Yubikey KSM and PHP >= 5.4
## https://github.com/Yubico/yubikey-ksm/issues/1
cd /usr/share/ykksm
curl -O https://raw.githubusercontent.com/Yubico/yubikey-ksm/master/ykksm-utils.php
@cygnetix
cygnetix / yubikey.ini
Last active August 29, 2015 14:12
/etc/php.d/yubikey.ini
include_path = "/etc/ykksm:/etc/ykval:/usr/share/ykksm:/usr/share/ykval"
@cygnetix
cygnetix / ykval-config.php
Last active August 29, 2015 14:12
/etc/ykval/ykval-config.php
<?php
$baseParams = array ();
$baseParams['__YKVAL_DB_DSN__'] = "mysql:dbname=ykval;host=localhost";
$baseParams['__YKVAL_DB_USER__'] = 'ykval_verifier';
$baseParams['__YKVAL_DB_PW__'] = 'secret';
$baseParams['__YKVAL_DB_OPTIONS__'] = array();
function otp2ksmurls ($otp, $client) {
return array("http://localhost/wsapi/decrypt?otp=$otp");
}
## /etc/httpd/conf.d/yubikey.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName yubikey.cygnetix.io
ErrorLog logs/yubikey.cygnetix.io-error_log
CustomLog logs/yubikey.cygnetix.io-access_log common
RewriteEngine on
RewriteRule ^(.*)$ $1.php [L]