Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#! /usr/bin/env python3 | |
from cryptography.hazmat.primitives.asymmetric import rsa, ed25519 | |
from cryptography.hazmat.primitives import serialization, hashes | |
private_key = ed25519.Ed25519PrivateKey.generate() | |
public_key = private_key.public_key() | |
our_private = private_key.private_bytes( | |
encoding=serialization.Encoding.PEM, |
# -*- coding: utf-8; mode:yaml; tab-width:2; indent-tabs-mode:nil; -*- | |
# vim: syntax=yaml ts=2 sw=2 sts=2 et si ai | |
# | |
# Install Oracle Java 7 with Salt Stack on Debian or Ubuntu | |
# | |
# References: | |
# https://gist.github.com/renoirb/6722890 | |
# https://gist.github.com/pwistrand/8918193 | |
# https://groups.google.com/forum/#!topic/salt-users/ynKNND9qxiI |
# | |
# How to install automatically Oracle Java 7 under Salt Stack for Debian | |
# | |
# References: | |
# https://gist.github.com/renoirb/6722890 | |
# https://groups.google.com/forum/#!topic/salt-users/ynKNND9qxiI | |
# http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html | |
# | |
python-apt: | |
pkg.latest |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# | |
# How to install automatically Oracle Java 7 under Salt Stack | |
# | |
# Thanks Oracle for complicating things :( | |
# | |
# 1. Create a java/ folder in your salt master | |
# 2. Paste this file in init.sls | |
# 3. salt '*' state.sls java | |
# | |
# Source: |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |