#Step 1: Update /etc/postfix/main.cf
$ sudo vim /etc/postfix/main.cf
Add the following lines, anywhere really, but preferably under the relayhost section:
relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
#!/bin/bash | |
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
# URL to monitor | |
URL="https://downloads.nomachine.com/download/?id=2" | |
# File to store previous version | |
DATA_DIR="${HOME}/nomachine_watch" | |
VERSION_FILE="${DATA_DIR}/previous_version.txt" |
escape_char / | |
comment_char % | |
% This file was generated by taking the LC_TIME section from en_US and | |
% replacing date/time representation with that of sv_SE from the glibc | |
% locale sources | |
% (http://sourceware.org/git/?p=glibc.git;a=tree;f=localedata/locales;hb=HEAD) | |
% (https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html) | |
% This file is part of the GNU C Library and contains locale data. |
#Step 1: Update /etc/postfix/main.cf
$ sudo vim /etc/postfix/main.cf
Add the following lines, anywhere really, but preferably under the relayhost section:
relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
set nocompatible " be iMproved, required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' |
#!/usr/bin/python3 | |
import cgitb; cgitb.enable(); | |
import requests | |
import string, sys, time, urllib | |
import xml.etree.ElementTree as et | |
def print_header(): | |
print("""<html> | |
<head> |
#!/usr/bin/python3 | |
import requests | |
import string, sys, time, urllib | |
import xml.etree.ElementTree as et | |
def read_feed(url): | |
r = requests.get(url) | |
root = et.fromstring(r.text) |
#!/usr/bin/python | |
import commands | |
import sys | |
import md5 | |
import random | |
if len(sys.argv) <= 2: | |
print("usage: mk_ipsum.py <num> <dir>\n") | |
sys.exit(1) |
#!/usr/bin/env python2.7 | |
import datetime, gnupg, pytz, time | |
from selenium import webdriver | |
from selenium.webdriver import Firefox | |
from selenium.webdriver.firefox.options import Options | |
#from selenium.webdriver.common.action_chains import ActionChains | |
#from selenium.webdriver.common.by import By | |
#from selenium.webdriver.support.ui import WebDriverWait | |
#from selenium.webdriver.support import expected_conditions as EC |
#!/usr/bin/env python | |
gifts = [ | |
{'name':'partridge', 'total':0}, | |
{'name':'turtle_doves', 'total':0}, | |
{'name':'french_hens', 'total':0}, | |
{'name':'calling_birds', 'total':0}, | |
{'name':'golden_rings', 'total':0}, | |
{'name':'geese', 'total':0}, | |
{'name':'swans', 'total':0}, |
Load Balancing FTP. | |
If you run an FTP server at scale, you will eventually want to load balance it. This is no mean task as FTP is a notoriously finicky protocol. Those familiar with FTP will know that it uses more than one TCP connection; the first connection is the command channel and the second is the data channel. To successfully load balance FTP, you must address both of these connections. | |
To further complicate matters, the data channel can be established using two methods. FTP Active or FTP Passive. For the rest of this document, I will simply use the terms active and passive to refer to these modes. First, let’s review how the command and data channels are used in FTP. | |
Active FTP. | |
When using FTP in active mode, the FTP client first connects to the server on port 21. This opens the command channel. The client authenticates itself, sets options, retrieves feature support from the server etc. The data channel is not opened until the client makes request that will result in the transfer of data from the |