Skip to content

Instantly share code, notes, and snippets.

View sheressa's full-sized avatar

Sheressa Macera sheressa

View GitHub Profile
@sheressa
sheressa / camel2underscore.py
Created September 12, 2016 08:59 — forked from bryant/camel2underscore.py
CamelCase -> camel_case
import re
_endpiecere = re.compile(r"[A-Z]+$")
_camelre = re.compile(r"([A-Z]+)(?=[0-9a-z])")
def camel2underscore(camel):
camel = _endpiecere.sub(lambda m: "_" + m.group(0).lower(), camel)
def insert(match):
m = match.group(0).lower()
return "_" + (m if len(m) == 1 else m[:-1] + "_" + m[-1])
@sheressa
sheressa / README.md
Created January 7, 2014 08:37 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/