A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
How to setup an Outline VPN Server on Ubuntu 16.04 Server
This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.
Outline Manager supports Windows, macOS and Linux.
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
// ==UserScript== | |
// @name Remember to eat your food while watching Netflix | |
// @namespace https://www.tarikguney.com | |
// @version 0.1 | |
// @description Kids watching cartoons on Netflix often forget to eat and chew their food, which drives parents crazy. You need to sit down with them and pause the video and remind them to eat their food. This script will automate that. | |
// @author Tarik Guney | |
// @match https://www.netflix.com/watch/* | |
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Netflix_icon.svg/1200px-Netflix_icon.svg.png | |
// @grant none | |
// ==/UserScript== |
<form method="post"> | |
{% csrf_token %} | |
{{ form }} | |
<button type="submit">Save changes</button> | |
</form> |
countries = [ | |
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
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
FROM node:13-alpine | |
WORKDIR /user/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
/* | |
* MIT License | |
* | |
* Copyright (c) 2017-2018 Bannerets <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |