Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)
- Create new instance in default network
- Chosse Ubuntu 16.04 LTS
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)
#SwitchResX Settings for LG 21:9 UltraWide
SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .
##Disabling System Integrity Protection (SIP)
If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:
#!/bin/bash | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
# -*- coding: utf-8 -*- | |
""" | |
More info: | |
http://flask.pocoo.org/docs/patterns/wtforms/ | |
http://pythonhosted.org/Flask-SQLAlchemy/ | |
https://flask-login.readthedocs.org/en/latest/ | |
""" | |
from flask import current_app, request, render_template, redirect, url_for | |
from myapp.models import User |
""" | |
A simple proxy server. Usage: | |
http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: | |
http://localhost:8080/p/www.google.com | |
""" |
// add this to your themes functions.php file | |
// change login image | |
add_action("login_head", "my_login_head"); | |
function my_login_head() { | |
echo " | |
<style> | |
body.login #login h1 a { | |
background: url('".get_bloginfo('template_url')."/assets/img/image-name.png') no-repeat scroll center top transparent; | |
height: 59px; | |
} |
def reltime(date, compare_to=None, at='@'): | |
r'''Takes a datetime and returns a relative representation of the | |
time. | |
:param date: The date to render relatively | |
:param compare_to: what to compare the date to. Defaults to datetime.now() | |
:param at: date/time separator. defaults to "@". "at" is also reasonable. | |
>>> from datetime import datetime, timedelta | |
>>> today = datetime(2050, 9, 2, 15, 00) | |
>>> earlier = datetime(2050, 9, 2, 12) |
/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:(\.|,)\d+)?$/ |
A warning occurred (42 apples) | |
An error occurred |