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
#!/bin/bash
#
# Copyright (c) 2016 Katsuya SAITO
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
#
# @(#) letsencrypt_cert_autoupdate_webroot.sh ver.0.1.0 2016.01.31
#
# Usage:
#
@brianjking
brianjking / letsencrypt.md
Created February 19, 2016 00:17 — forked from g-p-g/letsencrypt.md
Using letsencrypt

Download

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Generate SSL certificate

@brianjking
brianjking / letsencrypt-renew
Created February 19, 2016 00:17 — forked from rhwilr/letsencrypt-renew
letsencrypt-renew
#!/bin/bash
web_service='nginx'
config_file=$1
le_path='/opt/letsencrypt'
exp_limit=30;
if [ $# -eq 0 ]; then
echo "Please specifie the path of the config file"
@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
cheat sheets.
$ command line ruby cheat sheets
Setup
-----
git clone <repo>
clone the repository specified by <repo>; this is similar to "checkout" in
some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:

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 / class.wdm_functions.php
Created February 5, 2016 06:13
Calendarize.it Social Auto Publish Add-on (private)
<?php
/*
* function for facebook auto publishing "Events" custom post.
*/
session_start();
use Facebook\FacebookSession;
use Facebook\FacebookRedirectLoginHelper;