A Pen by Paulina Hetman on CodePen.
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
version: "3.9" | |
volumes: | |
postgres: | |
services: | |
postgres: | |
image: postgres | |
restart: unless-stopped | |
healthcheck: |
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
<svg viewBox="0 0 960 300"> | |
<symbol id="s-text"> | |
<text text-anchor="middle" x="50%" y="80%">Montserrat</text> | |
</symbol> | |
<g class = "g-ants"> | |
<use xlink:href="#s-text" class="text-copy"></use> | |
<use xlink:href="#s-text" class="text-copy"></use> | |
<use xlink:href="#s-text" class="text-copy"></use> | |
<use xlink:href="#s-text" class="text-copy"></use> |
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 | |
echo 'setup-web2py-nginx-uwsgi-ubuntu-precise.sh' | |
echo 'Requires Ubuntu > 12.04 and installs Nginx + uWSGI + Web2py' | |
# Check if user has root privileges | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must run the script as root or using sudo" | |
exit 1 | |
fi | |
# Get Web2py Admin Password | |
echo -e "Web2py Admin Password: \c " |
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 optparse import make_option | |
import os | |
from django.core.management import BaseCommand | |
import configobj | |
from django.db.models import get_app, get_model | |
class Command(BaseCommand): | |
""" | |
Creates django models from config files | |
""" |
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
# Jekyll Quick Reference (Cheat Sheet) | |
## Table of Contents | |
- [Jekyll Commands](#jekyll-commands) | |
- [Octopress Commands](#octopress-commands) | |
- [Folder Structure](#folder-structure) | |
- [Global Variables](#global-variables) | |
- [Site Variables](#site-variables) | |
- [Page Variable](#page-variables) |
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 os | |
import re | |
import argparse | |
app_path = os.path.split(os.path.split(__file__)[0])[0] | |
PROJECT_ROOT = os.path.abspath(app_path) | |
regexps = [ | |
(r'class=(["\'] *?)row-fluid(.*?["\']+)', r'class=\1row\2'), | |
(r'class=(["\'] *?)brand(.*?["\']+)', r'class=\1navbar-brand\2'), |
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 os | |
def split(filehandler, delimiter=',', row_limit=10000, | |
output_name_template='output_%s.csv', output_path='.', keep_headers=True): | |
""" | |
Splits a CSV file into multiple pieces. | |
A quick bastardization of the Python CSV library. | |
Arguments: |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
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
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
NewerOlder