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

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]
@db
db / bulletproof-git-workflow.md
Last active January 11, 2024 06:05
bulletproof git workflow

Bulletproof Git Workflow

start working

git checkout master
git pull
git checkout -b feature/my-work
# edit your files
@rhwilr
rhwilr / letsencrypt-renew
Last active February 19, 2016 00:17
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"
@palawer
palawer / domain.com.conf
Created February 11, 2016 19:27
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
@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;
@fevangelou
fevangelou / my.cnf
Last active July 1, 2025 02:51
Optimized my.cnf configuration for MySQL/MariaDB (on cPanel/WHM servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on cPanel/WHM servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated September 2024 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@aallan
aallan / speedtest-ifttt.sh
Last active May 29, 2022 15:50
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use IFTTT by: Alasdair Allan, 2015
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
###########################################################################
# Character for separating values
# (commas are not safe, because some servers return speeds with commas)
@kacchan822
kacchan822 / letsencrypt_cert_autoupdate_webroot.sh
Last active February 19, 2016 00:17
letsencrypt_cert_autoupdate
#!/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:
#
@rafaelfoster
rafaelfoster / nginx_reverse_proxy.conf
Created January 28, 2016 18:16
Reverse Proxy with Nginx
upstream targetwebservice {
server host2.example.com:8000 weight=1 fail_timeout=300s;
}
#server {
# listen 8081;
# server_name servername.exameple.com;
# add_header Strict-Transport-Security max-age=2592000;
# rewrite ^/.*$ https://servername.exameple.com/ permanent;
#}
server {
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active September 11, 2024 08:13
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.