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 ruby | |
# | |
# Convert blogger (blogspot) posts to jekyll posts | |
# | |
# Basic Usage | |
# ----------- | |
# | |
# ./blogger_to_jekyll.rb feed_url | |
# | |
# where `feed_url` can have the following format: |
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
module Jekyll | |
class Pagination < Generator | |
# This generator is safe from arbitrary code execution. | |
safe true | |
# Generate paginated pages if necessary. | |
# | |
# site - The Site. | |
# |
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
location ~* ^/remote-files/(http[s]*://)(.*?)/(.*) { | |
# Do not allow people to mess with this location directly | |
# Only internal redirects are allowed | |
internal; | |
# nginx has to be able to resolve the remote URLs | |
resolver 8.8.8.8; | |
# Location-specific logging | |
#access_log /usr/local/etc/nginx/logs/internal_redirect.access.log main; |
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
<link rel="canonical" href="http://yourdomain.com{{ page.url | replace:'index.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
from django.test import LiveServerTestCase | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.firefox.webdriver import WebDriver | |
class MySeleniumTests(LiveServerTestCase): | |
@classmethod | |
def setUpClass(cls): |
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
# Replacement for ImageFilter.GaussianBlur which always sets the | |
# blur radius to the default of 2. | |
# Code from http://aaronfay.ca/content/post/python-pil-and-gaussian-blur/ | |
import ImageFilter | |
class MyGaussianBlur(ImageFilter.Filter): | |
name = "GaussianBlur" | |
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
Copyright the authors of Honcho and/or Ben Lopatin | |
Licensed for reuse, modification, and distribution under the terms of the MIT license |
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
if CONF.has_key?("mounts") | |
for folder in CONF['mounts'] | |
config.vm.share_folder(folder['name'], folder['virtual'], folder['host'], :nfs => true) | |
end | |
end |
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
require "yaml" | |
# Load up our vagrant config files -- vagrantconfig.yaml first | |
_config = YAML.load(File.open(File.join(File.dirname(__FILE__), | |
"vagrantconfig.yaml"), File::RDONLY).read) | |
# Local-specific/not-git-managed config -- vagrantconfig_local.yaml | |
begin | |
_config.merge!(YAML.load(File.open(File.join(File.dirname(__FILE__), | |
"vagrantconfig_local.yaml"), File::RDONLY).read)) |
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
### MODEL | |
# -*- coding: utf-8 -*- | |
""" | |
Models for the "flatpages" project | |
""" | |
import time | |
import socket | |
from django.db import models |
OlderNewer