Skip to content

Instantly share code, notes, and snippets.

@krokodilerian
krokodilerian / get-port-status-snmp.sh
Created June 17, 2015 14:48
check snmp ports status
#!/bin/bash
if [ -z "$2" ]; then
echo Usage: "$0" hostname community
exit 4
fi
srv="$1"
com="$2"
snmp="snmpget -v 2c -c $2 -Cf -Ov -OQ $srv"
@krokodilerian
krokodilerian / gist:3b37b81a8b21b766f8ad
Last active August 29, 2015 14:19
read crap from port
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
int main() {
unsigned int data;
data = inl(0x66c);
prinf ("%X\n", data);
return 0;

Presentation build system

Description

This is what I use to build my slides. I have the following goals:

<?php
include "config.php";
global $dbh;
function do_query($query, $params=array()) {
global $dbh;
try {
$stmt = $dbh->prepare($query);
if (empty($params)) {