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
javascript:var%20auto%20={names:%20'Steve%20Buscemi%20Catherine%20Keener%20Dermot%20Mulroney%20Danielle%20Zerneck%20James%20LeGros%20Rica%20Martens%20Peter%20Dinklage%20Kevin%20Corrigan%20Hilary%20Gilford%20Robert%20Wightman%20Tom%20Jarmusch%20Michael%20Griffiths%20Matthew%20Grace%20Ryan%20Bowker%20Francesca%20DiMauro',blurb:%20'phpBB%20is%20a%20free,%20open%20source%20Internet%20community%20application,%20with%20outstanding%20discussion%20forums%20and%20membership%20management.%20Written%20in%20the%20PHP%20scripting%20language,%20and%20making%20use%20of%20the%20popular%20MySQL%20database,%20phpBB%20is%20a%20standard%20among%20web%20hosting%20companies%20throughout%20the%20world,%20and%20is%20one%20of%20the%20most%20widely-used%20bulletin%20board%20packages%20in%20the%20world.%20phpBB%20short-circuits%20the%20need%20for%20you%20to%20be%20a%20web%20development%20master%20in%20order%20to%20create%20and%20manage%20massive%20online%20communities',password:%20'secret',fillerup:%20function()%20{var%20all_inputs%20= |
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
import sys | |
from BeautifulSoup import BeautifulSoup as bs | |
soup=bs(open(sys.argv[1],'r').read()) | |
print soup.prettify() |
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 ctypes import * | |
from ctypeslib.contrib.pythonhdr import * | |
def quick_summary(data,words=150): | |
ots = OTS() | |
ots.parse_string(data) | |
return ots.summarize_by_words(words) | |
class OTS: | |
libots = None |
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
@media screen and (max-width: 980px) { | |
/************************************************************************************ | |
STRUCTURE | |
*************************************************************************************/ | |
.pagewidth { | |
max-width: 94%; | |
} | |
/* content */ |
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
@mixin gradient($from, $to) { | |
background-color: $from; /* fallback/image non-cover color */ | |
background-image: -moz-linear-gradient($from, $to); /* Firefox 3.6+ */ | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); /* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-linear-gradient($from, $to); /* Safari 5.1+, Chrome 10+ */ | |
background-image: -o-linear-gradient($from, $to); /* Opera 11.10+ */ | |
// extras from http://www.colorzilla.com/gradient-editor/ | |
background: -ms-linear-gradient(top, $from 0%,$to 100%); /* IE10+ */ | |
background: linear-gradient(to bottom, $from 0%,$to 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$from', endColorstr='$to',GradientType=0 ); /* IE6-9 */ |
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 flask import Request | |
class ProxiedRequest(Request): | |
""" | |
`Request` subclass that overrides `remote_addr` with Frontend Server's | |
HTTP_X_FORWARDED_FOR when available. | |
""" | |
@property | |
def remote_addr(self): |
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
<!-- ======================= begin newsletter signup code ======================= --> | |
<style> | |
#ed_signup_box { | |
background: #E8E8E8; | |
margin: 10px 0; | |
padding: 10px; | |
border: 1px solid #D62828; | |
border-radius: 5px; | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; |
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
#!/bin/bash | |
# Get the directory that this script is running from and cd to there | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd $DIR | |
echo "Deploying $DIR" | |
# tell hyde to rebuild whole site to production_deploy and note the | |
# script will bail out if hyde returns an error | |
hyde gen -c production.yaml -r -d production_deploy/ || exit $? | |
# copy only changed files to the server | |
rsync -cvraz --delete production_deploy/* user@example.com:/var/www/ |
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
mysql -e 'show databases' | while read dbname; do mysqldump --complete-insert --single-transaction "$dbname" | gzip > "$dbname".sql.gz; done |