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 / 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 / importSVGFilesAsLayers.js
Created May 30, 2014 07:07
Illustrator script to import a folder of SVG files into separate offset layers
// Import SVG Files as Layers - Illustrator CS3 script
// Description: Imports a folder of SVG files as named layers into a new document
// Author: Robert Moggach (rob@moggach.com)
// Version: 0.0.1 on 2014-05-29
function getFolder() {
return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
}
@rjmoggach
rjmoggach / array_functions.h
Last active January 22, 2021 15:01
VEX Array Functions
function int[] swap (int arr1[]; int arr2[]) {
int temp[] = arr1;
arr1 = arr2;
arr2 = temp;
return {1};
}
function int swap (int x; int y) {
int tmp = x;
@rjmoggach
rjmoggach / nucamio.py
Last active January 9, 2021 17:07
nucamio
import math
import os
import re
import json
from pprint import pprint
from collections import OrderedDict
from operator import add
import maya.cmds as cmds
import maya.mel as mel
@rjmoggach
rjmoggach / mp4maker.ps1
Last active December 27, 2020 02:52
MP4 Maker
Write-Host "Watch this!"
$src_folders = @(
"folder_one-yo",
"folder_two-yo",
"folder_three-yo",
"HRMND_wavedata",
"HRMND_windtunnel",
"HRMND_zonalambience"
)
@rjmoggach
rjmoggach / remapBlackBody.mel
Last active September 1, 2020 21:54
Remap Black Body Ramp to normalized mask
for( $i=0; $i<50; ++$i ) {
connectAttr -f nodeBlackBody.outCoord[$i] remapBlackBody.red[$i].rp;
connectAttr -f nodeBlackBody.outColor[$i].outColorR remapBlackBody.red[$i].rfv;
setAttr "remapBlackBody.ri" 2;
}
for( $i=0; $i<50; ++$i ) {
connectAttr -f nodeBlackBody.outCoord[$i] remapBlackBody.green[$i].gp;
connectAttr -f nodeBlackBody.outColor[$i].outColorG remapBlackBody.green[$i].gfv;
setAttr "remapBlackBody.gi" 2;
@rjmoggach
rjmoggach / rivet.mel
Created August 27, 2020 16:59
Maya MEL Rivet Script
// Copyright (C) 2000-2001 Michael Bazhutkin - Copyright (C) 2000 studio Klassika
// www.geocites.com/bazhutkin
// bazhutkin@mail.ru
//
// Rivet (button) 1.0
// Script File
// MODIFY THIS AT YOUR OWN RISK
//
// Creation Date: April 13, 2001
//
@rjmoggach
rjmoggach / ffmpeg-html5
Last active July 15, 2020 05:16 — forked from yellowled/ffmpeg-html5
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. Will probably convert this to a bash script later, but for the time being, here's some examples. Not sure there have actually sensible dimensions and bitrates for web video.
#!/usr/bin/env bash
FULLFILE="$1"
FILENAME=$(basename "$FULLFILE" | cut -d. -f1)
# webm
for size in 640x360; do
ffmpeg -i $FULLFILE -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s ${size} ${FILENAME}-${size}.webm
done
@rjmoggach
rjmoggach / cloudSettings
Last active June 20, 2020 22:19 — forked from nsrmoggach/extensions.json
VSCode's Settings - Syncing
{"lastUpload":"2020-06-20T22:19:51.851Z","extensionVersion":"v3.4.3"}
@rjmoggach
rjmoggach / nc-toggle-maint.sh
Created February 2, 2020 16:04
NextCloud Toggle Maintenance Mode
#!/usr/bin/env bash
function get_maint() {
echo `sudo -u www-data php /var/www/nextcloud/occ maintenance:mode`
}
function set_maint() {
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
}