Skip to content

Instantly share code, notes, and snippets.

View Frankie-B's full-sized avatar
💭
New Day New Code

Frankie Bukenya Frankie-B

💭
New Day New Code
  • The Netherlands
View GitHub Profile
@Frankie-B
Frankie-B / .jshintrc.js
Created March 18, 2022 21:47 — forked from connor/.jshintrc.js
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@Frankie-B
Frankie-B / ffmpeg.md
Created March 18, 2022 20:33 — forked from Orangestar12/ffmpeg.md
quick ffmpeg cheat sheet

These are a few quick easy ffmpeg command lines that can be used to make oft-used video formats. I use them a lot so I wrote them down in a txt file but I converted it to markdown to upload here and access on all my pcs.

Feel free to use 'em. I've gathered them through superuser posts, wiki trawls, and personal experience.

General notes

  • Add -movflags faststart to make mp4 files have their headers at the beginning of the file, allowing them to be streamed (i.e. played even if only part of the file is downloaded).
  • The MP4 container supports MP3 files, so if libfdk_aac isnt available (it's the only good AAC enc) use libmp3lame.
    • Update: unless you're uploading them to Twitter. Twitter doesn't like MP4 files with MP3 audio. Fall back to AAC and provide a higher quality alternative somewhere else.
  • For MP4 files, use -preset X to use MP4 enc presets, like slow or superfast. (veryfast or fast is ok)
@Frankie-B
Frankie-B / ffmpeg.md
Created March 18, 2022 20:32 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@Frankie-B
Frankie-B / youtube-dl-cheat.txt
Created March 18, 2022 20:31 — forked from philosopherdog/youtube-dl-cheat.txt
youtube-dl cheat sheet
# Basic Download:
youtube-dl URL
# Download Playlist, put in folder, and index with order:
youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' URL
# Download to /$uploader/$date/$title.$ext:
youtube-dl -o '%(uploader)s/%(date)s/%(title)s.%(ext)s' URL
# Download playlist starting from certain video:
@Frankie-B
Frankie-B / vanilla-js-cheatsheet.md
Created March 13, 2022 16:54 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@Frankie-B
Frankie-B / javascript-classes.md
Created March 7, 2022 10:22 — forked from zoxon/javascript-classes.md
Adding and Removing Classes, with simple cross-browser JavaScript

Adding and Removing Classes, with simple cross-browser JavaScript

The standard JavaScript way to select an element is using document.getElementById("Id"), which is what the following examples use - you can of course obtain elements in other ways, and in the right situation may simply use this instead - however, going into detail on this is beyond the scope of the answer.

To change all classes for an element:

To replace all existing classes with one or more new classes, set the className attribute:

document.getElementById("MyElement").className = "MyClass";
@Frankie-B
Frankie-B / The ultimate gitignore!
Created March 4, 2022 21:18 — forked from onero/The ultimate gitignore!
The ultimate gitignore!
# Created by Adamino @ https://www.gitignore.io/api/java,android,netbeans,intellij,windows,csharp,wordpress,drupal,sass,linux,bluej,unity,unrealengine,grunt,yeoman,adobe,c++,bower,coffeescript,composer,eclipse,jetbrains,magento,joomla,laravel,lua,meteorjs,node,kobalt,python,objective-c,rails,swift,visualstudio,umbraco,visualstudiocode,webstorm,xamarinstudio,xcode,sublimetext
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
@Frankie-B
Frankie-B / .gitignore
Created March 4, 2022 21:18 — forked from Swader/.gitignore
ultimate-gitignore
# Composer
vendor
composer.phar
# IntelliJ - PhpStorm and PyCharm
.idea
*.ipr
*.iws
# Eclipse
@Frankie-B
Frankie-B / multiple_ssh_setting.md
Created March 2, 2022 11:24 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Frankie-B
Frankie-B / !ebp-express-boilerplate.js
Created March 1, 2022 19:47 — forked from krisb1220/!ebp-express-boilerplate.js
Massively Useful VS Code Snippets
/*===========================================
this is what !ebp evals to
===========================================*/
const express = require('express');
const session = require('express-session');
const bodyParser = require('body-parser');
const passport = require('passport');
const cookieParser = require('cookie-parser');
const mongoose = require('mongoose');
const dotenv = require('dotenv');