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 / ease.js
Created July 17, 2019 01:32
After Effects Easing Functions
function easeExpo(beginValue, endValue, duration, offset) {
t = time - offset;
if (t < 0) return beginValue;
if (t > duration) return endValue;
if (beginValue.constructor == Array) {
x = 0;
y = 0;
z = 0;
if (beginValue.length == 2) {
x = easeExpo(beginValue[0], endValue[0], duration, offset);
@rjmoggach
rjmoggach / overclock_nvidia.sh
Created November 20, 2017 15:33
overclock nvidia bash script
#!/usr/bin/env bash
DEFAULT_FAN=65
DEFAULT_MEM=1500
DEFAULT_GPU=150
DEFAULT_POW=200
echo "Setting up ${GPU_COUNT} GPU(s)..."
GPU_COUNT="$(nvidia-smi -L | wc -l)"
@rjmoggach
rjmoggach / gulpfile.js
Last active January 24, 2019 17:30
mediumra.re gulpfile for insight and pipeline themes...
/* eslint-disable */
// REQUIRE STATEMENTS
const fs = require('fs'),
path = require('path'),
gulp = require('gulp'),
pixrem = require( 'gulp-pixrem' ),
log = require('fancy-log'),
newer = require('gulp-newer'),
runSequence = require('run-sequence'),
sass = require('gulp-sass'),
@rjmoggach
rjmoggach / profitcoin.py
Created November 16, 2017 02:45
python script to return currently most profitable coins to mine
#!/usr/bin/env python
import urllib2
import json
import argparse
SRC_META = {
'whattomine': {
'url': "https://whattomine.com/coins.json",
'sort_key': 'profitability',
@rjmoggach
rjmoggach / RRM_utils.py
Created February 19, 2018 18:02 — forked from evitolins/RRM_utils.py
Maya Python Snippets
'''
This fixes a RRM bug (v1.4.7) where saved RRM setups do not preserve a
module's 'pinned' status.
'''
import maya.cmds as cmds
import maya.mel
def RRM_fixPinBug(objs):
for obj in objs:
trans = cmds.xform(obj,q=True, r=True, translation=True)
maya.mel.eval("RRM_PinProxies(1, 0);")
@rjmoggach
rjmoggach / font_convert.py
Created May 8, 2013 14:13
Python script to convert a hierarchy of fonts to OTF format This is useful if you have a huge collection of mac fonts that use resource forks and want cross platform fonts. Use at your own risk. It's not fully tested. Backup your originals before you run the script to be safe. It requires the fontforge python library.
#!/usr/bin/python
import os, sys, string, re, MacOS
from string import capwords
import fontforge as ff
from optparse import OptionParser
TEST = False
SKIP_FILES = ['.DS_Store', '.AppleDB', 'convert_font.log', 'Icon?']
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@rjmoggach
rjmoggach / font_family.py
Created May 8, 2013 14:16
Python script to change the font family of individual font files. It's useful if you have multiple fonts that should be the same family but are not grouped together in GUI software.
#!/usr/bin/python
import os, sys, string, re, MacOS
from string import capwords
import fontforge as ff
from optparse import OptionParser
SKIP_FILES = ['.DS_Store', '.AppleDB', 'convert_font.log', 'Icon?']
class DirectoryWalker:
@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 / 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 / _divider.scss
Created March 11, 2016 22:08
Bootstrap 4 Column Dividers
@import 'variables';
$divider-height: 100%;
@mixin make-column-dividers($breakpoints: $grid-breakpoints) {
// Common properties for all breakpoints
%col-divider {
position: absolute;
content: " ";
top: (100% - $divider-height)/2;