But original post can not access anymore.
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/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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 eventlet import sleep, wsgi, listen | |
def application(environ, start_response): | |
start_response("200 OK", [("Content-Type", "text/plain")]) | |
sleep(1) | |
return ["Hello, world!"] | |
def main(): | |
wsgi.server(listen(('', 8000)), application) |
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
/* | |
* matchMedia() polyfill - test whether a CSS media type or media query applies | |
* authors: Scott Jehl, Paul Irish, Nicholas Zakas | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* dev.w3.org/csswg/cssom-view/#dom-window-matchmedia | |
* in Chrome since m10: http://trac.webkit.org/changeset/72552 | |
*/ |
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 | |
__author__ = 'Frank Smit <[email protected]>' | |
__version__ = '0.1.0' | |
import functools | |
import psycopg2 | |
from tornado.ioloop import IOLoop, PeriodicCallback |
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 tornado import ioloop | |
from tornado import iostream | |
import socket | |
class Envelope(object): | |
def __init__(self, sender, rcpt, body, callback): | |
self.sender = sender | |
self.rcpt = rcpt[:] | |
self.body = body | |
self.callback = callback |
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 /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |
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
class DropboxMixin(tornado.auth.OAuthMixin): | |
""" Dropbox OAuth authentication. | |
""" | |
_OAUTH_REQUEST_TOKEN_URL = "https://api.dropbox.com/1/oauth/request_token" | |
_OAUTH_ACCESS_TOKEN_URL = "https://api.dropbox.com/1/oauth/access_token" | |
_OAUTH_AUTHORIZE_URL = "https://www.dropbox.com/1/oauth/authorize" | |
_OAUTH_VERSION = "1.0" | |
_OAUTH_NO_CALLBACKS = False | |
def authorize_redirect(self, callback_uri=None, extra_params=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
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
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 | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |
OlderNewer