Skip to content

Instantly share code, notes, and snippets.

View rcguy's full-sized avatar

rcguy

  • 127.0.0.1
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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) {
#!/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 / nginx.sh
Last active January 13, 2017 08:12
#!/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
OPENSSL_VER="1.1.0c"
NGINX_VER="1.11.8"
@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
[Unit]
Description=irssi daemon
After=network.target
[Service]
Type=forking
User=%i
ExecStart=/usr/bin/screen -dmS autodl irssi
ExecStop=/usr/bin/screen -S autodl -X stuff '/quit\n'
WorkingDirectory=%h