Skip to content

Instantly share code, notes, and snippets.

View rjmoggach's full-sized avatar
🦄
React'ing.

Robert Moggach rjmoggach

🦄
React'ing.
View GitHub Profile
@rjmoggach
rjmoggach / randomPassword.sh
Created October 11, 2014 21:44
Random Password Generator
function random_pass {
CHARACTER_ARRAY=("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "+" "-" "." "@" "%")
RANGE=67
COUNTER=1
while [ $COUNTER -lt 16 ]; do
row[$COUNTER]=$RANDOM
let "row[$COUNTER] %= $RANGE"
while [ ${row[$COUNTER]} = 0 ]; do
row[$COUNTER]=$RANDOM
let "row[$COUNTER] %= $RANGE"
@rjmoggach
rjmoggach / bashScope.sh
Last active February 6, 2018 04:52
Bash Function Scope
#!/bin/env bash
ARG01="moderately $1"
ARG02="seriously $2"
sanity_check() {
local you=$1
local me=$2
echo "You are $you"
echo "I am $me"
@rjmoggach
rjmoggach / webfaction_gitlab.md
Last active October 8, 2023 08:39
Webfaction GitLab Install

Install Gitlab on webfaction

November 2014

I wanted to install gitlab on my shared hosting server at webfaction and here's how I did it. Be warned it's a memory hog. I couldn't get it below 450Mb. Also... this is for their newer 64 bit servers. I tried on a 32 bit server and didn't want to waste a day tracking down dependencies.

Create app for gitlab

Create a new app (using python)

@rjmoggach
rjmoggach / webfaction_meteor.py
Last active August 18, 2017 12:41
Webfaction MongoDB/Meteor Install
#!/usr/local/bin/python2.7
import xmlrpclib
import os
import socket
import wget
import getpass
from subprocess import call
# Set some defaults
@rjmoggach
rjmoggach / colors.import.less
Created December 5, 2014 05:10
Combo of Flat UI and BootFlat Colors
// Flat UI Colors
@turquoise: #1abc9c;
@green-sea: #16a085;
@emerald: #2ecc71;
@nephritis: #27ae60;
@peter-river: #3498db;
@belize-hole: #2980b9;
@amethyst: #9b59b6;
@wisteria: #8e44ad;
@wet-asphalt: #34495e;
@rjmoggach
rjmoggach / webfaction_google.py
Created January 3, 2015 22:14
Webfaction Google Apps DNS
#!/usr/bin/env python2.5
import xmlrpclib
# EDIT: webfaction credentials
username = raw_input("Please enter your username: ")
password = raw_input("Please enter your password: ")
# no need to edit below this line
server = xmlrpclib.Server('https://api.webfaction.com/')
session_id, account = server.login(username, password)
@rjmoggach
rjmoggach / shotlinker.sh
Created February 7, 2015 21:01
Flame Project Shot Linker
#! /usr/bin/env bash
#
# SHOT LINKER
# create links in a flame project to storage server paths
# Note: we only create them local to the flame project to avoid
# dumb backups of symlinks creating duplicated data - with this in mind
# the script assumes the project is local to the flame - know what you're backing up
# archiving a project's setups may also archive all the paths linked to if you're not careful!
@rjmoggach
rjmoggach / setWacom.sh
Created February 24, 2015 22:38
xsetwacom Intuos4
#!/usr/bin/env bash
#################
# Wacom buttons :
#################
# tablet identificators :
# xinput --list | grep '[w|W]acom'
DEVICE="Wacom Intuos4 4x6 pad"
STYLUS="Wacom Intuos4 4x6 stylus"
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:02
Famous App Chaining Modifiers in Famo.us 0.3.1 // source http://jsbin.com/rudufu/1
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Chaining Modifiers in Famo.us 0.3.1" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:02
Famous App Transitionable Size Famo.us 0.3.5 // source http://jsbin.com/ruboju
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Transitionable Size Famo.us 0.3.5" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />