This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).bind('pageinit', function(e) { | |
// start jqtweet! | |
JQTWEET.loadTweets(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> x = "a\nb" | |
>>> x | |
'a\nb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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+') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "add_before_head.py", line 43, in <module> | |
page.save(True) | |
AttributeError: 'NoneType' object has no attribute 'save' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "add_before_head.py", line 43, in <module> | |
page.save(True) | |
AttributeError: 'NoneType' object has no attribute 'save' |