Skip to content

Instantly share code, notes, and snippets.

View rcguy's full-sized avatar

rcguy

  • 127.0.0.1
View GitHub Profile
#!/bin/bash
# Dependencies
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
# vars
PAGESPEED_VER="1.11.33.2"
OPENSSL_VER="1.0.2h"
@rcguy
rcguy / lazyload.js
Created October 15, 2015 19:07
lazyload.js (c) Lorenzo Giuliani
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){
if (document.querySelectorAll) {
@rcguy
rcguy / build-rtl.sh
Last active August 29, 2015 14:25
compile rtl-sdr for the raspberrypi
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
sudo printf 'blacklist dvb_usb_rtl28xxu\nblacklist rtl2832\nblacklist rtl2830' > /etc/modprobe.d/nortl.conf
sudo apt-get install git-core git cmake libusb-1.0-0-dev build-essential -y
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
@rcguy
rcguy / playAudio.html
Last active August 29, 2015 14:17
play audio using a button/javascript on an html webpage
<!DOCTYPE html>
<html>
<audio id="audio1" src="audio1.ogg" autobuffer></audio>
<script>
var aid = document.getElementById("audio1");
aid.volume = 0.2;
function EvalSound(soundobj) {
var thissound=document.getElementById(soundobj);
@rcguy
rcguy / rTorrent_ruTorrent_v3.sh
Last active August 24, 2021 01:21
Install and setup: new rtorrent user, apache2, php5, XMLRPC, rTorrent, Libtorrent, ruTorrent.Tested on: Ubuntu Server 14.10 x64 / 4 Cores / 4GB RAM / 20 GB SSD / VPS
#!/bin/bash
# Install and setup: new rtorrent user, apache2, XMLRPC, rTorrent, Libtorrent, ruTorrent.
# Tested on: Ubuntu Server 14.10 x64 / 4 Cores / 4GB RAM / 20 GB SSD
# ==> VARIABLES <==
# Software Versions
LIBTORRENT_VER="0.13.6"
RTORRENT_VER="0.9.6"
RUTORRENT_VER="3.7"
RUTORRENT_PLUGINS_VER="3.6"
@rcguy
rcguy / LAMP_phpMyAdmin.sh
Last active November 21, 2018 09:44
Installs LAMP and phpMyAdmin
#!/bin/bash
# Installs LAMP and phpmyadmin on Ubuntu 14.10
# Tested on: Ubuntu Server 14.10 - x64 + x86 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> MAIN PROGRAM <==
set -e
# mysql variables
MYSQL_ROOT_PASS="root"
@rcguy
rcguy / insurgency.sh
Last active August 29, 2015 14:16
Installs INSURGENCY (2014) Dedicated Server on Ubuntu
#!/bin/bash
# Name: install-insurgency.sh
# Version: 1.0
# Author: rcguy
# Updated: 03.09.2015
# Tested on: Ubuntu Server 14.10 x64 / 2 Cores / 2GB RAM / 20 GB SSD
# ==> USER VARIABLES <==
STEAM_USER="steam" # user to run the game-server
@rcguy
rcguy / MediaWiki.sh
Last active August 29, 2015 14:16
Non-Interactive Script that installs MediaWiki, LAMP, and sets up the MySQL Database on Ubuntu 14.10
#!/bin/bash
# Installs MediaWiki, LAMP, and setup the MySQL Database on Ubuntu 14.10
# Tested on: Ubuntu Server 14.10 - x64 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> USER VARIABLES <==
MYSQL_ROOT_PASSWORD="root"
DB_NAME="mediawiki"
DB_USER="mediawiki"
DB_USER_PASSWORD="mediawiki"
@rcguy
rcguy / ownCloud.sh
Last active August 29, 2015 14:16
Non-Interactive Script that adds the ownCloud apt repository, installs ownCloud, then creates a MySQL user & database for it
#!/bin/bash
# Installs ownCloud and setup the MySQL Database on Ubuntu 14.10
# Tested on: Ubuntu Server 14.10 - x64 + x86 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> USER VARIABLES <==
# mysql variables
MYSQL_ROOT_PASS="root"
DB_NAME="owncloud"
DB_USER="owncloud"
DB_USER_PASS="owncloud"
@rcguy
rcguy / webmin.sh
Last active January 15, 2017 11:08
Non-Interactive Script that adds the Webmin apt repository then installs Webmin and dependencies
#!/bin/bash
# Adds the Webmin apt repository then installs Webmin and dependencies
# Tested on: Ubuntu Server 14.10 - x64 + x86 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> MAIN PROGRAM <==
set -e
cat >>/etc/apt/sources.list.d/webmin.list <<EOF
# webmin
deb http://download.webmin.com/download/repository sarge contrib
EOF