Skip to content

Instantly share code, notes, and snippets.

fritz stelluto gotofritz

Block or report user

Report or block gotofritz

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
View lazydocker config.yml
# ~/Library/Application\ Support/jesseduffield/lazydocker/config.yml
reporting: "on"
customCommands:
services:
- name: start
attach: false
command: docker-compose up -d {{ .Service.Name }}
@gotofritz
gotofritz / _ffmpeg.sh
Last active Jun 26, 2019
Various ffmpeg commands
View _ffmpeg.sh
# ffmpeg snippets
# ffmpeg-slowdown.sh: slow down all files in a directory
# ffmpeg-to-mp3.sh: convert all video files in a directory to mp3
# handbrake-bulk.sh: convert all webm fils in a folder to mp4
@gotofritz
gotofritz / cra.sh
Last active Jul 9, 2019
Creates a simple CRA project, removing some of the unnecessary files
View cra.sh
# Creates a simple CRA project, removing some of the unnecessary files
# (Eventually I will build a proper tool to do this, but in the meantime...)
# ensure there is a project name to build
if [[ $1 == '' ]]; then
echo 'Usage: cra the_name_of_a_folder_you_want_created'
exit
fi
project_name=$1
@gotofritz
gotofritz / npm-list.sh
Last active Oct 19, 2017
NPM bits and pieces
View npm-list.sh
# given that $PACKAGE is the package about which you want to find out more
# this lists only the modules you have installed
npm ls
# list available versions of $PACKAGE
# note the plural, versionS - without it, you only get the current version
npm show $PACKAGE versions
# this finds the latest version of your package as well as other with similar names
@gotofritz
gotofritz / gitlab-markdown-toc.js
Last active May 7, 2019
creates a gitlab markdown table of contents for a README.md page
View gitlab-markdown-toc.js
// quick and dirty snippet to creates a gitlab markdown table of contents for a README.md page
// preview gitlab page and paste in browser console
var str = "";
$('.file-content')
.find('h1, h2, h3, h4, h5, h6, h7')
.each((i, node) => {
// node.tagName is H1 H2...
let indent = Number(node.tagName[1]) - 1;
// markdown mested lists are
// - xxx
@gotofritz
gotofritz / current-script-directory.sh
Last active Nov 13, 2016
Bash scripting snippets
View current-script-directory.sh
# gives you the directory in which the running script is
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@gotofritz
gotofritz / .Git bits and pieces
Last active Aug 22, 2017
Git bits and pieces
View .Git bits and pieces
# Bulk Resolve Conflics
# Changing username after a commit
# Compare Versions
# Delete A Branch
# Empty Dirs
# Get Info
# Ignore A File That Was Already Pushed
# Log With Actual Changes
# Log With List Of Files
# Move Commits To Another Branch
@gotofritz
gotofritz / _html5.html
Last active Dec 25, 2015
Minimal HTML documents
View _html5.html
<!DOCTYPE html>
<html lang="en">
<head>
<!-- charset always before title to avoid UTF-7 exploits -->
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
@gotofritz
gotofritz / prevent-select.css
Created Oct 9, 2013
for touch devices, disables selection
View prevent-select.css
.preventSelect {
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
@gotofritz
gotofritz / pretty-print-json.sh
Created May 9, 2013
Pretty print Json on the command line
View pretty-print-json.sh
curl http://api.joind.in | python -mjson.tool
You can’t perform that action at this time.