Skip to content

Instantly share code, notes, and snippets.

View brianjking's full-sized avatar
💭
Doin' cool stuff at BrandMuscle AI

Brian J King brianjking

💭
Doin' cool stuff at BrandMuscle AI
View GitHub Profile
@brianjking
brianjking / metalsmith.md
Created February 19, 2016 00:15 — forked from JosefJezek/metalsmith.md
Metalsmith
@brianjking
brianjking / django-install-nginx-uwsgi.md
Created February 19, 2016 00:05 — forked from fduran/django-install-nginx-uwsgi.md
Django Install - Nginx uwsgi

Django Install - Nginx uwsgi

Once per server:

apt-get update && apt-get upgrade
apt-get install python-setuptools python-dev build-essential
easy_install -U pip
pip install virtualenv

@brianjking
brianjking / domain.com.conf
Created February 19, 2016 00:04 — forked from palawer/domain.com.conf
Apache + Django config
WSGIPythonPath /var/www/domain.com/project
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/domain.com/project/
WSGIScriptAlias / /var/www/domain.com/project/project/wsgi.py
#WSGIPythonPath /var/www/domain.com/project

Setting up a RaspberryPi Web Server with NginX

WARNING!

I started this guide as I was building my web server but it was never finished. Nonetheless there's some valuable info for anyone starting a web server from scratch.

Steps

  1. [download offline raspbian][0]
  2. follow instructions for [no screen install of raspbian][1]
  3. setup [static ip address][2], reserve in router, and update hosts file on remote computer
  4. follow [secure web server][7], [secure ssh best practices][3], setup [ssh-copy-id in mac][4]
@brianjking
brianjking / my.cnf
Created February 9, 2016 13:45 — forked from fevangelou/my.cnf
Optimized MySQL configuration for cPanel servers
# Optimized MySQL configuration for cPanel servers by Fotis Evangelou - Updated Feb 2016
#
# The settings provided below are a starting point for a 4GB-8GB RAM server with 4 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is NO comment beside a setting, then you don't need to adjust it.
@brianjking
brianjking / README.md
Created February 3, 2016 02:10 — forked from jacobsvante/README.md
My version of the Agnoster theme, with Virtualenv support

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@brianjking
brianjking / README.md
Created February 1, 2016 01:13 — forked from Ins1ne/README.md
My ZSH Theme — Agnoster Mod

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@brianjking
brianjking / docx2md.md
Created January 13, 2016 18:02 — forked from jesperronn/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@brianjking
brianjking / conf.py
Created January 8, 2016 14:49 — forked from tk0miya/conf.py
sphinxcontrib_markdown
sys.path += ["."]
extensions += ["markdown"]
markdown_title = 'hello world'
source_suffix = '.md'
@brianjking
brianjking / README.rst
Created January 7, 2016 02:50 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.