This file contains hidden or 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
// jscs: disable | |
/* | |
Setup with crontab: | |
* * * * * /usr/bin/node /home/dirrk/scripts/plex-info/index.js >> /var/log/plex/plexstatus.log 2>/dev/null | |
Setup splunk to consume json with timestamp from utc on timestamp field | |
Example dashboard: http://imgur.com/E5jBA7S | |
*/ | |
var wreck = require('wreck'), |
This file contains hidden or 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 | |
VERSION=2.8.19 | |
SERVICEDIR=/services/redis | |
INSTALLDIR=/opt/redis | |
REDISPASSWORD=hunter2 | |
# Install | |
if [ ! -e $INSTALLDIR/redis-$VERSION ]; then | |
cd /tmp | |
wget http://download.redis.io/releases/redis-$VERSION.tar.gz |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$home_env = true | |
Vagrant.configure(2) do |config| | |
config.vm.define "web" do |web| | |
web.vm.box = "centos-nginx-nodejs" | |
web.vm.box_check_update = false |
This file contains hidden or 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
# For gmtimonitor app in prod | |
user nobody; | |
worker_processes 1; | |
daemon off; | |
error_log /app/nginx/logs/error.log; | |
events { | |
worker_connections 1024; |
This file contains hidden or 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 | |
# This installs nginx and node under /app | |
NODE_VERSION=4.2.1 | |
if [ "$UID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
if [ ! -e /usr/bin/gcc ] || [ ! -e /usr/bin/make ]; then | |
echo gcc or make not installed going to install dev tools in 5 seconds press ^C to exit | |
sleep 6 |
This file contains hidden or 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
mkdir -p /opt/ghost/downloads | |
cd /opt/ghost/ | |
mv /opt/ghost/*.zip /opt/ghost/downloads/ | |
wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip | |
unzip ghost-*.zip package.json | |
version=`cat package.json | grep "version" | cut -d: -f2 | tr -d ' ",'` | |
version=ghost-$version | |
if [ ! -e /opt/ghost/$version ]; then |
This file contains hidden or 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 | |
# Install daemon tools | |
if [ "$UID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
if [ ! -e /usr/bin/gcc ] || [ ! -e /usr/bin/make ]; then | |
echo gcc or make not installed going to install dev tools in 5 seconds press ^C to exit | |
sleep 6 | |
yum -y groupinstall 'Development Tools' |
This file contains hidden or 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 | |
# setup nginx config and service folder | |
if [ "$UID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# Variables | |
nginxsdir=/services/nginx |
This file contains hidden or 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
worker_processes 1; | |
daemon off; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |
NewerOlder