- Install SQUID
apt-get install squid
- Create an user
htpasswd -md /etc/squid3/users myuserlogin`
package main | |
import ( | |
"fmt" | |
"time" | |
"os" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
) |
#!/usr/bin/env python | |
# encoding: utf-8 | |
import codecs | |
import os | |
import sys | |
import numpy as np | |
from sklearn.feature_extraction.text import TfidfVectorizer |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" | |
"errors" | |
"io" | |
"log" |
/** | |
* truncate_html() | |
* | |
* Truncates a HTML string to a given length of _visisble_ (content) characters. | |
* E.g. | |
* "This is some <b>bold</b> text" has a visible/content length of 22 characters, | |
* though the total string length is 29 characters. | |
* This function allows you to limit the visible/content length whilst preserving any HTML formatting. | |
* | |
* @param string $html |
apt-get install squid
htpasswd -md /etc/squid3/users myuserlogin`
# Ignore all | |
* | |
# Unignore all with extensions | |
!*.* | |
# Unignore all dirs | |
!*/ | |
### Above combination will ignore all files without extension ### |
Use: for testing against email regex | |
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses | |
List of Valid Email Addresses | |
email@example.com | |
firstname.lastname@example.com | |
email@subdomain.example.com | |
firstname+lastname@example.com |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
<?php | |
<<<CONFIG | |
packages: | |
- "symfony/dom-crawler: ~2.3" | |
- "symfony/css-selector: ~2.3" | |
CONFIG; | |
use Symfony\Component\DomCrawler\Crawler; | |
$html = <<<HTML |
// To the extent possible under law, the Yawning Angel has waived all copyright | |
// and related or neighboring rights to orhttp_example, using the creative | |
// commons "cc0" public domain dedication. See LICENSE or | |
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details. | |
package main | |
import ( | |
// Things needed by the actual interface. | |
"golang.org/x/net/proxy" |