Skip to content

Instantly share code, notes, and snippets.

@trexx
trexx / Program.cs
Created Nov 11, 2021
Simple DB Connection
View Program.cs
using System;
using Microsoft.Data.SqlClient;
using System.Text;
namespace sqltest
{
class Program
{
static void Main(string[] args)
{
@trexx
trexx / onc_converter.py
Last active Aug 27, 2020
The .ovpn to .onc converter
View onc_converter.py
#!/usr/bin/python
# The .ovpn to .onc converter
# This tool parses an 'inline' OpenVPN profile (certs and keys are included within the .ovpn file)
## and spits out a Open Network Configuration file which can be imported in to ChromeOS.
# Open Network Configuration specs can be found here
## https://chromium.googlesource.com/chromium/src/+/master/components/onc/docs/onc_spec.md
# Original credit goes to Steve Woodrow (https://github.com/woodrow)
@trexx
trexx / nginx-ngx_http_access.conf
Created Dec 20, 2017
Fail2Ban using ngx_http_access_module.
View nginx-ngx_http_access.conf
# Fail2Ban configuration file
#
# Author: Turan Asikoglu
#
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.