Skip to content

Instantly share code, notes, and snippets.

View rgeraldporter's full-sized avatar

Robert Gerald Porter rgeraldporter

View GitHub Profile
// results from console.log() tested in Chrome 58, Firefox 51, Safari 10.0
// block scope
{
function foo() { return 1; }
}
// returns "1"
console.log( foo() );
// IIFE
(function() {
@rgeraldporter
rgeraldporter / ramda-curry-side-effects.js
Created November 20, 2017 19:06
RamdaJS trick, handle uncurried side-effect functions (e.g. console) in a chain while still currying the value back
//RamdaJS trick, handle uncurried side-effect functions (e.g. console) in a chain while still currying the value back
const sideFx = R.pipe(R.juxt([console.log, console.error, R.identity]), R.last);
// > R.pipe(R.add(1), sideFx, R.add(4))(1);
// >> console.log(2);
// >> console.error(2);
// >> 6
20:10 $ ./mach build --dev -v
rustup run --install nightly-2018-01-27 cargo build --manifest-path /Users/rob/Documents/git/servo/ports/servo/Cargo.toml -v
Fresh memoffset v0.2.1
Fresh traitobject v0.1.0
Fresh termcolor v0.3.6
Fresh binary-space-partition v0.1.2
Fresh histogram v0.6.8
Fresh precomputed-hash v0.1.1
Fresh dtoa v0.4.1
Fresh num-traits v0.1.37
@rgeraldporter
rgeraldporter / unit-integrity.sh
Created January 10, 2019 20:01
Check unit test for fdescribe, etc.
#!/bin/sh
bold=$(tput bold)
normal=$(tput sgr0)
red=$(tput setaf 1)
green=$(tput setaf 2)
white=$(tput setaf 7)
blue=$(tput setaf 4)
grey=$(tput setaf 251)
EcoLore
Logged Out*
login -> Logged In
register -> Logged In
Logged In
Projects*
Public Projects*
enter project -> A Project
Songster
Inactive Paused
unpause -> Inactive Unpaused
Inactive Unpaused
timer completes -> Active
is paused -> Inactive Paused
Active
is wrong time of day -> Inactive Unpaused
@rgeraldporter
rgeraldporter / SketchSystems.spec
Last active May 21, 2019 20:29
Weever Deployment System
Weever Deployment System
QA of Release*
complete -> Deploy to Stage
issue found -> Create Ticket
Deploy to Stage
complete -> QA of Stage
error -> Notify Dev Ops
QA of Stage
const jQuery = require("jquery");
Object.defineProperty(window, "jQuery", { value: jQuery });
Object.defineProperty(window, "$", { value: jQuery });
const angular = require("angular");
Object.defineProperty(window, "angular", { value: angular });
require("angular-mocks");
require("./");
@rgeraldporter
rgeraldporter / spectrogram.sh
Last active September 18, 2023 08:44
Spectrogram Video Generation
#!/usr/bin/env bash
# Note that some tweaks may be required to make the overlay "line" to appear correctly where the audio is actually playing
# The overlay.png needs to be 1920 x 784 for this, if you change scale you'll need to change that file size
# FFMPEG makes very stuttery videos in spectrograms in some ratios/resolutions; I've tried to do high res but with little success
# So far these settings are the smoothest I can get, but it can still look a bit stuttery in YouTube / full screen on a big screen
# The various steps below involve generating the spectrogram, adding the overlay visual, adding the audio,
# moving the audio over a bit to line up with the play line, framing the video in a more standard resolution/ratio