Skip to content

Instantly share code, notes, and snippets.

View MantasVaitkunas's full-sized avatar

Mantas Vaitkūnas MantasVaitkunas

View GitHub Profile
@MantasVaitkunas
MantasVaitkunas / merge_to_ovpn.py
Last active April 30, 2020 13:46
Script adds ca.crt client.crt and client.key to client.ovpn
# Script generates client.ovpn from given files. Useful when files are generated via easy-rsa.
# Usage: python merge_to_ovpn.py client.ovpn ca.crt client1.crt client1.key
import sys
import os
ovpn_file = sys.argv[1]
ca_file = sys.argv[2]
client_crt = sys.argv[3]
client_key = sys.argv[4]
@MantasVaitkunas
MantasVaitkunas / plantuml_generate_svg
Created September 20, 2016 09:45
Example how to generate svg file with PlanUml
java -jar /opt/plantuml.jar -svg -o ./ *.puml
@MantasVaitkunas
MantasVaitkunas / conf.py.rst
Last active August 16, 2020 19:47 — forked from mgedmin/conf.py.rst
HOWTO add "Show on GitHub" and "Edit on GitHub" links to the Sphinx sidebar

Edit on GitHub links for Sphinx

Create _ext/ and _templates/ subdirectories.

Move edit_on_github.py into the _ext/ subdirectory.

Move sourcelink.html into the _templates/ subdirectory.

Add the following after the import sys, os line

dbus-send --system --print-reply \
--dest="org.freedesktop.UPower" \
/org/freedesktop/UPower \
org.freedesktop.UPower.Suspend
#!/bin/bash
set -e
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make