An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# -*- coding: utf-8 -*- | |
# Author: Douglas Creager <[email protected]> | |
# This file is placed into the public domain. | |
# Calculates the current version number. If possible, this is the | |
# output of “git describe”, modified to conform to the versioning | |
# scheme that setuptools uses. If “git describe” returns an error | |
# (most likely because we're in an unpacked copy of a release tarball, | |
# rather than in a git working copy), then we fall back on reading the | |
# contents of the RELEASE-VERSION file. |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS | |
dev tun | |
proto udp #Some people prefer to use tcp. Don't change it if you don't know. | |
port 1194 | |
ca /etc/openvpn/easy-rsa/keys/ca.crt | |
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME | |
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME | |
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here! | |
server 10.8.0.0 255.255.255.0 | |
# server and remote endpoints |
#!/bin/bash | |
# Default Variable Declarations | |
DEFAULT="Default.txt" | |
FILEEXT=".ovpn" | |
CRT=".crt" | |
KEY=".3des.key" | |
CA="ca.crt" | |
TA="ta.key" | |
This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.
Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).
Instructions:
Make shure all the required packages are installed. For example on Ubuntu and Debian run:
$ sudo apt-get install python3 network-manager-openvpn-gnome
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Simple script illustrating how to perform embarrassingly parallel computations | |
in Python using MPI/mpi4py. I like this approach a lot as its very easy to get | |
right without having to deal with the complications arising from forked | |
processes which the multiprocessing module uses. | |
This script can be executed with or without `mpirun`; it will just run on one | |
core if not executed with it. With some more logic its also possible to make |
#!/bin/bash | |
############# | |
# n8henrie's Raspberry Pi CrashPlan installer script | |
# v0.1.0 :: 20160530 | |
############# | |
set -e | |
CP_VERSION="4.8.0" |
# /etc/systemd/system/crashplan.service | |
[Unit] | |
Description=CrashPlan | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
Type=forking | |
PIDFile=/usr/local/crashplan/CrashPlanEngine.pid | |
EnvironmentFile=/usr/local/crashplan/bin/run.conf |
<!DOCTYPE qgis_style> | |
<qgis_style version="0"> | |
<symbols/> | |
<colorramps> | |
<colorramp type="gradient" name="Magma"> | |
<prop k="color1" v="0,0,3,255"/> | |
<prop k="color2" v="251,252,191,255"/> | |
<prop k="stops" v="0.04;4,4,21,255:0.08;14,10,42,255:0.12;26,16,65,255:0.16;40,17,89,255:0.20;57,15,110,255:0.23;74,16,121,255:0.27;90,21,126,255:0.31;105,28,128,255:0.35;121,34,129,255:0.39;137,40,129,255:0.43;153,45,127,255:0.47;169,50,124,255:0.51;185,55,120,255:0.55;202,62,114,255:0.59;217,70,106,255:0.62;230,81,98,255:0.66;240,96,93,255:0.70;247,113,91,255:0.74;251,132,96,255:0.78;253,151,104,255:0.82;254,170,116,255:0.86;254,188,130,255:0.90;253,207,146,255:0.94;253,225,163,255:0.98;252,243,181,255"/> | |
</colorramp> | |
<colorramp type="gradient" name="Inferno"> |
""" | |
=============== | |
Qt Fourier Demo | |
=============== | |
""" | |
import contextlib | |
import sys | |
from matplotlib.backends.backend_qt5agg import FigureCanvas |