Skip to content

Instantly share code, notes, and snippets.

@palaniyappanBala
palaniyappanBala / openssl_client.c
Created February 5, 2017 22:46 — forked from MartinMReed/openssl_client.c
OpenSSL Client Example
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#define HOST "encrypted.google.com"
/**
* Example SSL client that connects to the HOST defined above,
* and prints out the raw response to stdout.
*/
@palaniyappanBala
palaniyappanBala / openssl_server.c
Created February 5, 2017 22:45 — forked from MartinMReed/openssl_server.c
OpenSSL Server Example
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <string>
#include <sys/socket.h>
#include <netinet/in.h>
#define IP_ADDR INADDR_ANY
@palaniyappanBala
palaniyappanBala / pysyslog.py
Created February 3, 2017 15:42 — forked from marcelom/pysyslog.py
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@palaniyappanBala
palaniyappanBala / Post to WordPress
Created January 2, 2017 21:41 — forked from sgerin/Post to WordPress
Post to WordPress from Python.
import datetime
import xmlrpclib
import keychain
import clipboard
wp_url = "http://www.yoursite.com/xmlrpc.php"
wp_username = 'username'
wp_password = keychain.get_password('wordpress', wp_username)
wp_blogid = ""
"""pyvbox: How to copy a file from a VM.
"""
import os
import virtualbox
# Assume machine is already running.
vbox = virtualbox.VirtualBox()
machine = vbox.find_machine("win7")
session = machine.create_session()