- GET Requests
- POST/PUT Requests
""" | |
A simple proxy server, based on original by gear11: | |
https://gist.github.com/gear11/8006132 | |
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough. | |
Usage: http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: http://localhost:5000/p/www.google.com | |
""" | |
import re |
- GET Requests
- POST/PUT Requests
This is a little automation script I wrote to configure, boot and/or destroy Linodes using the Linode API. This script requires the Requires the linode-python module to wrap the API.
I had written this with the intent of providing users with a temporary Linode that would be destroyed after an hour or two, but the functions are pretty generic and could be repurposed. The interactive mode lets users enter their e-mail address, and upon confirmation sends them a message with their Linode's IP & password.
If you'd like to use this script as-is, you'll need to substitute in your Linode API key, SMTP server details and you will also likely have use the avail_foo()
commands to grab the current IDs (e.g. for kernel release, distrubution, etc) and change the variables at the start of the script.
{url:'stun:stun01.sipphone.com'}, | |
{url:'stun:stun.ekiga.net'}, | |
{url:'stun:stun.fwdnet.net'}, | |
{url:'stun:stun.ideasip.com'}, | |
{url:'stun:stun.iptel.org'}, | |
{url:'stun:stun.rixtelecom.se'}, | |
{url:'stun:stun.schlund.de'}, | |
{url:'stun:stun.l.google.com:19302'}, | |
{url:'stun:stun1.l.google.com:19302'}, | |
{url:'stun:stun2.l.google.com:19302'}, |
main() { | |
# Use colors, but only if connected to a terminal, and that terminal | |
# supports them. | |
if which tput >/dev/null 2>&1; then | |
ncolors=$(tput colors) | |
fi | |
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
YELLOW="$(tput setaf 3)" |
from tkinter import * | |
import os | |
creds = 'tempfile.temp' # This just sets the variable creds to 'tempfile.temp' | |
def Signup(): # This is the signup definition, | |
global pwordE # These globals just make the variables global to the entire script, meaning any definition can use them | |
global nameE | |
global roots | |
# SNAKES GAME | |
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting | |
import curses | |
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
from random import randint | |
curses.initscr() | |
win = curses.newwin(20, 60, 0, 0) |
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
System: Host: Rebel Kernel: 4.13.0-32-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.3 Sylvia | |
Machine: System: LENOVO (portable) product: 80QQ v: Lenovo ideapad 100-15IBD | |
Mobo: LENOVO model: Nano 5B6 v: NO DPK Bios: LENOVO v: E0CN61WW date: 08/12/2016 | |
Chassis: type: 10 v: Lenovo ideapad 100-15IBD | |
CPU: Dual core Intel Core i3-5005U (-HT-MCP-) cache: 3072 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 7982 | |
clock speeds: min/max: 500/1900 MHz 1: 1995 MHz 2: 1995 MHz 3: 1995 MHz 4: 1995 MHz | |
Graphics: Card: Intel Broadwell-U Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1616 | |
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) |