Skip to content

Instantly share code, notes, and snippets.

@RubyClickAP
RubyClickAP / Vagrantfile
Created June 8, 2019 15:13 — forked from creisor/Vagrantfile
Vagrant file for installing ruby with rbenv
# -*- mode: ruby -*-
# vi: set ft=ruby :
RUBY_V = File.open("./.ruby-version") { |f| f.read }.chomp
$apt_script = <<SCRIPT
sudo apt-get update
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev libmysqlclient-dev
SCRIPT
postgresql:
image: sameersbn/postgresql:9.1-1
environment:
- DB_USER=redmine
- DB_PASS=phatiphohsukeuwo
- DB_NAME=redmine_production
redmine:
image: sameersbn/redmine:2.6.1
links:
- postgresql:postgresql
@RubyClickAP
RubyClickAP / etc-init.d-toriqueue-ub
Last active June 6, 2019 17:22
Remove must be run as root.
#! /bin/bash
### BEGIN INIT INFO
# Provides: Click-AP
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Resque worker via init.d (assumes you have Ruby, and a plugin to allow wildcards in queue names)
# Description: starts YAKITORY-Queue using start-stop-daemon
#user nobody;
worker_processes auto;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/mvideo2.pid;
events {
#! /bin/sh
### BEGIN INIT INFO
# Provides: Click-AP
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the Yakitory server
# Description: starts yakitory using start-stop-daemon
@RubyClickAP
RubyClickAP / etc-init.d-nginx-centos
Last active March 15, 2019 05:43
/etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
# pidfile: /opt/nginx/logs/nginx.pid
# user: nginx
@RubyClickAP
RubyClickAP / README.md
Created August 8, 2018 03:15 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@RubyClickAP
RubyClickAP / download.sh
Created August 3, 2018 03:04 — forked from Micka33/download.sh
Download/install Nginx +some convenient modules (rtmp/lua5.1/upstream-fair/ssl/etc) on Ubuntu
wget http://nginx.org/download/nginx-1.4.5.tar.gz
tar xzf nginx-1.4.5.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
tar xzf zlib-1.2.8.tar.gz
wget http://downloads.sourceforge.net/project/pcre/pcre/8.34/pcre-8.34.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F&ts=1393362418&use_mirror=kent
mv pcre-8.34.tar.bz2\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F pcre-8.34.tar.bz2
tar xjf pcre-8.34.tar.bz2
@RubyClickAP
RubyClickAP / gist:622924e1e1345a41d5fba198edff07bc
Created October 10, 2017 09:37 — forked from mbn18/gist:0d6ff5cb217c36419661
How to install nsenter on Ubuntu 14.04
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
# Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter
# start a container
docker run --name nsenter -it ubuntu:14.04 bash
## in the docker
apt-get update
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
@RubyClickAP
RubyClickAP / resque-web.init.d
Created January 26, 2017 05:02 — forked from tcopple/resque-web.init.d
an init.d script to start and top resque-web under the user 'resquer'
#! /bin/sh
### BEGIN INIT INFO
# Provides: resque-web
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: web interface for resque processing