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
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}", | |
"profiles": { | |
"defaults": { |
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
// Helper for implementing mixins. | |
function mixin(dest) { | |
for (var i = 1; i < arguments.length; i++) { | |
var source = arguments[i]; | |
for (var prop in source) { | |
if (!dest[prop]) { | |
dest[prop] = source[prop]; | |
} | |
} | |
} |
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
# Nginx+Unicorn best-practices congifuration guide. Now with SPDY! | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
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 BaseHTTPServer import BaseHTTPRequestHandler | |
from StringIO import StringIO | |
class HTTPRequest(BaseHTTPRequestHandler): | |
def __init__(self, request_text): | |
self.rfile = StringIO(request_text) | |
self.raw_requestline = self.rfile.readline() | |
self.error_code = self.error_message = None | |
self.parse_request() |
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
# -*- coding: utf-8 -*- | |
""" | |
flaskext.sqlalchemy | |
~~~~~~~~~~~~~~~~~~~ | |
Adds basic SQLAlchemy support to your application. | |
:copyright: (c) 2012 by Armin Ronacher. | |
:license: BSD, see LICENSE for more details. | |
""" |
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
author "Rahul Kumar <[email protected]>" | |
description "Disable ATI cards at start-up" | |
start on desktop-session-start | |
exec echo OFF > /sys/kernel/debug/vgaswitcheroo/switch |
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
# remap prefix to C-a | |
unbind C-b | |
set -g prefix C-a | |
bind a send-prefix | |
# force a reload of the config files. | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# Screen like bindings. |
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
user root; | |
worker_processes 4; | |
# [ debug | info | notice | warn | error | crit ] | |
events { | |
worker_connections 1024; | |
} | |
http { |
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 | |
import gevent | |
from gevent.pywsgi import WSGIServer | |
from gevent import monkey | |
monkey.patch_all() | |
from flask import Flask, Response | |
app = Flask(__name__) |
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 | |
import gevent | |
from gevent.pywsgi import WSGIServer | |
from gevent import monkey | |
monkey.patch_all() | |
from flask import Flask, Response | |
app = Flask(__name__) |
NewerOlder