Skip to content

Instantly share code, notes, and snippets.

$(document).bind('pageinit', function(e) {
// start jqtweet!
JQTWEET.loadTweets();
})
server {
listen 80;
server_name example.com;
#charset koi8-r;
#access_log /var/log/nginx/www.example.com.access.log main;
root /home/example/public_html/;
location / {
server {
listen 80;
server_name example.com;
#charset koi8-r;
#access_log /var/log/nginx/www.example.com.access.log main;
root /home/example/public_html/;
location /products {
server {
listen 80;
server_name example.com;
#charset koi8-r;
#access_log /var/log/nginx/www.example.com.access.log main;
root /home/edward/public_html/;
location / {
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /home/edward/public_html;
#index index.html index.htm;
# Make site accessible from http://localhost/
server_name my-site.example.com;
>>> x = "a\nb"
>>> x
'a\nb'
#!/usr/bin/env python
from bs4 import BeautifulSoup
import fnmatch
import os
import re
replacement_file = open('/tmp/t.txt', 'r')
for root, dirnames, filenames in os.walk('.'):
for filename in fnmatch.filter(filenames, '*.html'):
#!/usr/bin/env python
from bs4 import BeautifulSoup
import fnmatch
import os
import re
for root, dirnames, filenames in os.walk('.'):
for filename in fnmatch.filter(filenames, '*.html'):
f = open(os.path.join(root, filename), 'r+')
Traceback (most recent call last):
File "add_before_head.py", line 43, in <module>
page.save(True)
AttributeError: 'NoneType' object has no attribute 'save'
Traceback (most recent call last):
File "add_before_head.py", line 43, in <module>
page.save(True)
AttributeError: 'NoneType' object has no attribute 'save'