Skip to content

Instantly share code, notes, and snippets.

@Siot
Siot / vncserver
Created September 21, 2015 21:41
Custom vncserver script to load different xstartup for each VNC server
#!/usr/bin/env perl
#
# Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved.
# Copyright (C) 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
# Copyright (C) 2002-2003 Constantin Kaplinsky. All Rights Reserved.
# Copyright (C) 2002-2005 RealVNC Ltd.
# Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@Siot
Siot / ovpn.sh
Last active July 31, 2018 09:29
.ovpn creator script
#!/bin/bash
ip="1.2.3.4"
port="1194"
proto="udp"
############################
client=$1
ca="ca.crt"
@Siot
Siot / collector.php
Last active August 29, 2015 13:56
Very simple poll with jQuery, PHP and PDO
<?php
$host="localhost"; //url of database server;
$dbname=""; //database name;
$user=""; //database username;
$pass=""; //database password;
$table=""; //database table;
//Connection to mysql server;
$DBH = new PDO("mysql:host=$host;dbname=$dbname", $user, $pass);