Skip to content

Instantly share code, notes, and snippets.

@technige
technige / boltproxy.py
Created June 15, 2017 08:54
Simple proxy server for the Bolt protocol.
#!/usr/bin/env python
# coding: utf-8
# Copyright 2017, Nigel Small
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@showi
showi / gist:7b86b8bf45d49b809f2d
Last active March 16, 2023 14:01
Tutorial / Python / CherryPy / REST API
"""
Tutorial / Python / CherryPy / REST API
https://cherrypy.readthedocs.org/en/3.3.0/tutorial/REST.html
"""
import cherrypy
songs = {
'1': {
'title': 'Lumberjack Song',
'artist': 'Canadian Guard Choir'
@plentz
plentz / nginx.conf
Last active October 22, 2025 16:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@pwalsh
pwalsh / mac-osx-development-environment.rst
Last active February 4, 2020 18:38
A development environment configuration on Mac OS X using Homebrew for package management. The configuration supports web app development in Python and Node. Additionally, there are some dependencies for audio synthesis projects in Python and Clojure.

Mac OS X development environment

Homebrew [ http://brew.sh/ ]

It all begins with Homebrew. This setup uses Homebrew for almost everything, including things your Mac ships with, like Python.

Managing everything in Homebrew lets us use the most up-to-date packages available, and means we are not subject to any customizations, however small, Apple makes to their packaged software.

@fnielsen
fnielsen / hellocherry.py
Created October 2, 2012 13:16
CherryPy Hello World
# http://docs.cherrypy.org/stable/concepts/basics.html
import cherrypy
class HelloWorld:
def index(self):
return "Hello world!"
index.exposed = True
cherrypy.quickstart(HelloWorld())