Skip to content

Instantly share code, notes, and snippets.

@devster31
devster31 / nginx.conf
Last active July 9, 2021 09:35 — forked from spikegrobstein/nginx.conf
to add plex as a subdomain
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@devster31
devster31 / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@devster31
devster31 / systemd instructions.md
Created May 4, 2015 00:17
systemd units for syncthing OSX and unix

Mac OS X

Using homebrew

  1. brew install syncthing
  2. Follow the info to autostart syncthing using launchctl. At the moment this is done using this command: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist.

Without homebrew

Download syncthing for Mac: https://github.com/syncthing/syncthing/releases/latest.

@devster31
devster31 / links
Last active August 29, 2015 14:20
Shell redirection cheatsheet
@devster31
devster31 / serf
Last active August 29, 2015 14:21
serf init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: serf
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the serf agent
# Description: starts serf agent using start-stop-daemon
@devster31
devster31 / hhvminfo.php
Last active August 29, 2015 14:22 — forked from ck-on/hhvminfo.php
hhvminfo
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
@devster31
devster31 / fluent.conf
Created June 23, 2015 00:41
simple fluentd config for apache and syslog
## built-in TCP input
## $ echo <json> | fluent-cat <tag>
<source>
@type forward
@id forward_input
</source>
## built-in UNIX socket input
#<source>
# @type unix
@devster31
devster31 / apache_access.json
Created June 23, 2015 00:43
elasticsearch apache_access template
{
"order": 0,
"template": "*_apache_access",
"settings": {},
"mappings": {
"apache_logs": {
"properties": {
"country": {
"type": "string"
},
@devster31
devster31 / VVV-box.sh
Last active September 17, 2015 13:43
Varying Vagrant Vagrants base provisioning
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# Force Locale
echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
locale-gen en_US.UTF-8
# Install Some PPAs
echo '>>> Add Nginx development ppa'
apt-add-repository -y ppa:nginx/development 2>/dev/null