Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
(◕‿◕)

NullDev // Chris NullDev

:octocat:
(◕‿◕)
View GitHub Profile
@NullDev
NullDev / 1-README.md
Last active Apr 11, 2021
Auto-Skip Amazon Video Ads / Promos
View 1-README.md

Auto-Skip for Amazon Video Ads / Promos

You just want to binge your show but Amazon interrupts your experience with those annoying promos between the episodes?
LOOK NO FURTHER

This script saves you some clicks and automatically skips those promos for you.

How to install

@NullDev
NullDev / greaterThan.js
Last active Sep 5, 2020
A JavaScript implementation to allow expressions such as 3 > 2 > 1
View greaterThan.js
/**
* This basically allows expressions like 3 > 2 > 1
* which is usually written as 3 > 2 && 2 > 1
*
* I basically did this because I wanted to see how easy it is
* to implement such "new syntax" in JS
*
* Please don't use this. It's hacky.
*/
@NullDev
NullDev / README.md
Created Jan 16, 2020
Check if a windows binary (.exe) was compiled for 32 Bit or 64 Bit (useful for wine)
View README.md

About

This script checks whether a windows binary (.exe file) was compiled ro 32 Bit or 64 Bit. If you mess around with Wine / PlayOnLinux a lot, this could be useful.

Usage

Making the script executable

@NullDev
NullDev / random_string.js
Last active Mar 9, 2020
ES6 way of generating a random string with variable length
View random_string.js
let getRandomString = (length) => [...Array(length)].map(() => Math.random().toString(36)[2]).join("");
let str = getRandomString(10);
// -> 225n9b53x6
// ---
// Demo: https://jsfiddle.net/fku9y6sm/
@NullDev
NullDev / LICENSE.md
Last active Apr 11, 2021
This MIT License applies to all of my public gist's located at https://gist.github.com/NullDev
View LICENSE.md

MIT License

Copyright (c) NullDev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@NullDev
NullDev / StarRating.css
Last active Nov 17, 2020
CSS Star rating System - Percentage Based, CSS Only Star rating System
View StarRating.css
.rating {
unicode-bidi: bidi-override;
color: #c5c5c5;
font-size: 25px;
height: 25px;
width: 100px;
margin: 0 auto;
position: relative;
padding: 0;
text-shadow: 0px 1px 0 #a2a2a2;
@NullDev
NullDev / logger.js
Created Sep 23, 2019
NodeJS Logger with StackTrace function
View logger.js
"use strict";
/**
* Formats the current time
*
* @returns {string} Time
*/
let getDate = function(){
const date = new Date();
let hourData = date.getHours();
@NullDev
NullDev / fizzbuzz.js
Created Jul 12, 2019
Readble fizzbuzz one-liner in JavaScript
View fizzbuzz.js
Array.apply([], Array(100)).map((e, i) => [["fizz"][i % 3], ["buzz"][i % 5]].join("") || i);
@NullDev
NullDev / SpaceShip.js
Last active Nov 16, 2018
A weird implementation of PHP's Spaceship operator in JavaScript
View SpaceShip.js
Number.prototype["<=>"] = function(x){
return Math.sign(this - x);
}
var result = 5 ["<=>"] (4);
console.log(result);
// https://jsfiddle.net/ecaq931d/
@NullDev
NullDev / ChainFunction.js
Last active Nov 15, 2018
Global Chain function example with prototyping
View ChainFunction.js
Function.prototype.test = function(x){
var arg1 = this();
var arg2 = x;
console.log(
"Arg1: " + arg1 +
"\nArg2: " + arg2
);
}