Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block FranciscoG

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
FranciscoG /
Last active May 15, 2019
Convert Video to Image sequence using ffmpeg
ffmpeg -i -r 0.25 output_%04d.png
# -i followed by video file sets input stream
# -r set framerat. 1 = 1 frame per second.
# and then set the output file with the number replacement
# more info:
FranciscoG / scrollIt.js
Created Nov 6, 2018
Vanilla JS scroll window to an element
View scrollIt.js
* Source:
function scrollIt(destination, duration = 200, easing = 'linear', callback) {
const easings = {
linear(t) {
return t;

mb explanation


var mb=p=>o=>>o=(o||{})[c])&&o

// in ES5:
var mb = function(pathArray) { 
  return function(obj) {  
    return { 
FranciscoG /
Created Sep 20, 2018
Simple shell script to add a new site to my local macOS LAMP stack
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]
then echo "You must use sudo to run this script"
# Colors
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
FranciscoG /
Created Aug 17, 2018
bash and other terminal related things (heavily MacOS leaning)


  • variables difference between $VAR and ${VAR}
  • find and replace in a file (sed, tr)
  • conditionals
  • loops
  • reading command line arguments
  • function arguments
  • exiting
FranciscoG / logger.js
Last active Jun 27, 2018
wrapper around all the console methods so you can turn enable/disable them.
View logger.js
"use strict";
* Wrap console methods to turn them on/off with a flag
* Plus stub console methods for older browsers without console
* @param {boolean} debugFlag
function Logger(debugFlag){
View displayZeroWidthChars.js
Traverse through all the Text Nodes in a page and force them to display hidden characters
Hacker news:
user: tim333's js fiddle
medium post:
FranciscoG / acf_repeater_shortcode.php
Last active Sep 12, 2019
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
View acf_repeater_shortcode.php
* ACF Pro repeater field shortcode
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here:
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc
FranciscoG / specialChar.js
Created Jan 29, 2018
a collection of mini functions that return special characters from their character codes in Javascript
View specialChar.js
/* Special Characters */
// <
// less-than sign
const lt = () => String.fromCharCode(60);
// >
// greater-than sign
const gt = () => String.fromCharCode(62);
// "
FranciscoG / SimpleServer.js
Last active Oct 18, 2017
Work in Progress: A very very simplified Node server in the style of Express. Not to be used in production, meant for experimenting and testing
View SimpleServer.js
* Simple Node Server
* When you need a quick and dirty node server to do some experimenting/testing with
* but you don't want to install a whole Framework and its many many dependencies
* and you want something easy to extend
* WARNING: This is not meant to be used in production!
* I created this partly for learning node and partly for prototyping
You can’t perform that action at this time.