Skip to content

Instantly share code, notes, and snippets.

View fayland's full-sized avatar

Fayland Lam fayland

View GitHub Profile
@michaelfranzl
michaelfranzl / phantom.py
Created October 16, 2017 09:41
Simple but fully scriptable headless QtWebKit browser using PyQt5 in Python3, specialized in executing external JavaScript and generating PDF files. A lean replacement for other bulky headless browser frameworks.
#!/usr/bin/python3
"""
# phantom.py
Simple but fully scriptable headless QtWebKit browser using PyQt5 in Python3,
specialized in executing external JavaScript and generating PDF files. A lean
replacement for other bulky headless browser frameworks.
@ltriant
ltriant / mx.psgi
Last active October 2, 2017 06:39
Promises-based non-blocking Plack/PSGI app
#!/usr/bin/env perl
# mx.psgi -- get geographic information about a domain's mailservers
# This was written purely as an example real-world-ish non-blocking
# Plack/PSGI application because I'm sick of seeing the usual
# "Hello World"-esque examples.
# In one shell:
# $ feersum --listen :5000 -a mx.psgi
#

安装Perl

这是整个 Perl 教程的开始。

通过学习此教程,你将学会怎样在微软 Windows,Linux 和 Mac 操作系统上安装并使用Perl。以及,怎样搭建开发环境,简而言之,使用什么IDE或者编辑器写Perl程序。 然后,学习“Hello, World”这一经典例子。

Windows

@sshtmc
sshtmc / ubuntu-configure-sendmail-with-gmail
Created October 25, 2012 12:24
Ubuntu sendmail using smtp.gmail.com
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128