Skip to content

Instantly share code, notes, and snippets.

View dorneanu's full-sized avatar
💭
Engineering #security stuff in #go and #python in #AWS

Victor Dorneanu dorneanu

💭
Engineering #security stuff in #go and #python in #AWS
View GitHub Profile
@dorneanu
dorneanu / client.conf
Last active October 6, 2022 11:38
OpenVPN configuration
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
@dorneanu
dorneanu / multiprocessing.py
Created May 6, 2015 18:44
Simple parallelism with Python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
""" Simple demo of using multiprocessing when parsing files """
import sys
import os
import codecs
from multiprocessing import Pool, Process, Queue, cpu_count
@dorneanu
dorneanu / diagmagic.py
Created July 9, 2014 09:47
Embed blockdiag into IPython using ipython-diags
# -*- coding: utf-8 -*-
"""magics for using blockdiag.com modules with IPython Notebook
The module provides magics: %%actdiag, %%blockdiag, %%nwdiag, %%seqdiag
Sample usage (in IPython cell):
%%blockdiag
{
A -> B -> C;
@dorneanu
dorneanu / JBlowfish.java
Created July 1, 2014 17:35
Blowfish Decrypt/Encrypt in Java
/*
* Based on https://raw.githubusercontent.com/usefulfor/usefulfor/master/security/JBoss.java
*
* JBoss.java - Blowfish encryption/decryption tool with JBoss default password
* Daniel Martin Gomez <daniel@ngssoftware.com> - 03/Sep/2009
*
* This file may be used under the terms of the GNU General Public License
* version 2.0 as published by the Free Software Foundation:
* http://www.gnu.org/licenses/gpl-2.0.html
*/
@dorneanu
dorneanu / matplotlib-dashboard
Created March 7, 2014 08:38
Unfancy dashboard using matplotlib
import datetime as dt
import matplotlib.dates as mdates
from mpl_toolkits.axes_grid.axislines import Subplot
from time import sleep
%matplotlib inline
def gen_dashboard():
# Generate months
months = []