Skip to content

Instantly share code, notes, and snippets.

@Desani
Desani / ScanMedia.md
Last active May 4, 2024 01:20
3.6 - Corrected issues with determining terminal size in specific use cases. Added file encoding thanks to recommendation by LordKenmou. Fixed update script checker.

This script utilizes ffmpeg, the same tool Plex uses, to decode the video stream and captures the output for any errors during playback and sends the playback errors to a log file. So essentially it plays the video in the background faster than regular speed. It then checks the error output log file to see if there is anything inside. If ffmpeg was able to cleanly play the file, it counts as a passed file. If there is any error output, an error could be anything from a container issue, a missed frame issue, media corruption or more, it counts the file as failed. So if there would be an issue with playback and a video freezing, it would be caught by this method of checking for errors. Because of the nature of the error log, any errors that show up, even simple ones, will all count as a fail and the output is captured so you can view the error log. Some simple errors are easy to fix so I have included an auto-repair feature which attempts to re-encode the file which is able to correct some issues that would cau

@sbliven
sbliven / 404ForCaseSensitiveURLs.js
Last active March 16, 2024 09:32 — forked from AmrEldib/404ForCaseSensitiveURLs.js
Jekyll 404 page on GitHub Pages to fix case sensitive URLs
var allposts = [];
function redirectToCorrectPage() {
console.log("Unable to find page. Trying other URL cases.");
{% for post in site.pages %}
allposts.push("{{ post.url }}");
{% endfor %}
var url = window.location.pathname;
// strip trailing /
if (url.slice(-1) === "/") {
url = url.slice(0, -1);
@AmrEldib
AmrEldib / npm-g.md
Last active February 19, 2016 04:37
Recommended Global npm Packages to install

bower
ember-cli
ember-cli-windows
gitignore
jshint
swagger
editorconfig-cli

@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@hyl
hyl / emoji-aliases.json
Created July 17, 2015 13:27
JSON with every emoji alias.
{
"people": ["bowtie", "smile", "laughing", "blush", "smiley", "relaxed", "smirk", "heart_eyes", "kissing_heart", "kissing_closed_eyes", "flushed", "relieved", "satisfied", "grin", "wink", "stuck_out_tongue_winking_eye", "stuck_out_tongue_closed_eyes", "grinning", "kissing", "kissing_smiling_eyes", "stuck_out_tongue", "sleeping", "worried", "frowning", "anguished", "open_mouth", "grimacing", "confused", "hushed", "expressionless", "unamused", "sweat_smile", "sweat", "disappointed_relieved", "weary", "pensive", "disappointed", "confounded", "fearful", "cold_sweat", "persevere", "cry", "sob", "joy", "astonished", "scream", "neckbeard", "tired_face", "angry", "rage", "triumph", "sleepy", "yum", "mask", "sunglasses", "dizzy_face", "imp", "smiling_imp", "neutral_face", "no_mouth", "innocent", "alien", "yellow_heart", "blue_heart", "purple_heart", "heart", "green_heart", "broken_heart", "heartbeat", "heartpulse", "two_hearts", "revolving_hearts", "cupid", "sparkling_heart", "sparkles", "star", "star2", "dizzy",
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@AmrEldib
AmrEldib / Sync_gh-pages_with_master.sh
Last active August 29, 2015 14:07
Easily keep gh-pages in sync with master
# go to the gh-pages branch
git checkout gh-pages
# bring gh-pages up to date with master
git rebase master
# commit the changes
git push origin gh-pages
# return to the master branch
git checkout master
# Source: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
#RUN the following to kick off script-> START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/ytechie/9467867/raw/35bbd968b79f52b3e540c3203e8c8f611028eee9/boxstarter
#So Meta!
choco install chocolatey
choco install boxstarter
choco feature disable --name=checksumFiles
choco feature enable --name=allowGlobalConfirmation
#run the rest in the boxstarter shell
@l0gicpath
l0gicpath / all_users.csv
Last active November 11, 2017 13:59
Subtract data of one CSV file from another using fast grep. Dummy data generated by http://dummydata.me/
jame@out.org Stefanie House
dolores.bernice@roofroom.me Dinah Erickson
luke.homer.gerard@smile.info Melisa Reynolds
salvador.perry@selectionself.info Lily Carson
rich.jamel@cover.me Millard Rubio
benita@rangerat.edu Octavia Santana
vickie.mattie@westwet.info Royal Bender
dwayne@part.me Laverne Hutchins
jeanette.laurie.katie@light.me Sherman Wilder
jami.elnora@smokesmooth.edu Thelma Burris
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results