Skip to content

Instantly share code, notes, and snippets.

View charrismatic's full-sized avatar
☝️
Life is Code

Matt Harris charrismatic

☝️
Life is Code
View GitHub Profile
@charrismatic
charrismatic / README.md
Last active July 19, 2017 01:31 — forked from JoelBesada/README.md
Backtick Example Command

Backtick is a customizable command command pallete for chrome letting you run your own javascript snippets easily in a live browsing session.

Backtick

To createa a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

@charrismatic
charrismatic / README.md
Created April 3, 2018 23:51 — forked from hofmannsven/README.md
Using a dynamic admin body class within WordPress to distinguish between light or dark admin interface.
@charrismatic
charrismatic / ansi-color.php
Created April 10, 2018 22:53 — forked from superbrothers/ansi-color.php
ANSI color terminal output module for php
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@charrismatic
charrismatic / .eslintrc
Created May 3, 2018 16:24 — forked from alefteris/.eslintrc
ESLint default config in YAML format
---
parser: espree
env:
amd: false
browser: false
es6: false
jasmine: false
jquery: false
meteor: false
mocha: false
@charrismatic
charrismatic / simple_args_parsing.sh
Created August 17, 2018 05:37 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@charrismatic
charrismatic / AAA_README.example.md
Last active October 22, 2018 19:33 — forked from jxson/README.md
README.md template

Always Add A Readme

Backers on Open Collective Sponsors on Open Collective standard-readme compliant

Standard Readme Style

Your README file is normally the first entry point to your code. It should tell people why they should use your module, how they can install it, and how they can use it. Standardizing how you write your README makes creating and maintaining your READMEs easier. Great documentation takes work!

This repository contains:

@charrismatic
charrismatic / standard_format_fixers__unix.md
Last active October 18, 2018 06:07 — forked from watson/README.md
A list of search and replace unix commands to help make a node repository 'standard' compliant

The standard code style linter is a great tool by Feross - check it out!

Remove trailing semicolons:

find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;

Ensure space between function and opening bracket:

@charrismatic
charrismatic / README.md
Created April 22, 2019 04:58 — forked from yang-wei/README.md
ES6 destructing (and rest parameter)

We will first discussed how destructing and rest parameters can be used in ES6 - in arrays and objects. Then we will look at a few examples and also discuss some quiz.

arrays

var array = [1, 2, 3, 4];
var nestedArray = [1, 2, 3, 4, [7, 8, 9]];

var [a, b, c, d] = array;
console.log(a, b, c, d)
@charrismatic
charrismatic / timelapse.md
Created March 2, 2020 15:32 — forked from alexellis/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@charrismatic
charrismatic / sugh.sh
Created April 4, 2020 04:40 — forked from RCODI/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then