Skip to content

Instantly share code, notes, and snippets.


NullDev (Chris) NLDev

Block or report user

Report or block NLDev

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
NLDev /
Created Jan 16, 2020
Check if a windows binary (.exe) was compiled for 32 Bit or 64 Bit (useful for wine)


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.


Making the script executable

NLDev / random_string.js
Last active Oct 2, 2019
ES6 way of generating a random string with variable length
View random_string.js
let getRandomString = function(length){
return [...Array(length)].map(() => Math.random().toString(36)[2]).join("");
let str = getRandomString(10);
// -> 225n9b53x6
// ---
// Demo:
NLDev /
Last active Sep 26, 2019
This MIT License applies to all of my public gist's located at

MIT License

Copyright (c) NLDev

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:

NLDev / StarRating.css
Last active Sep 26, 2019
Basic CSS only percentage based 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;
NLDev / 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();
NLDev / 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);
NLDev / 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);
NLDev / 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;
"Arg1: " + arg1 +
"\nArg2: " + arg2
NLDev /
Last active Apr 25, 2018
Pagination Example


/* -- Pagination -- */
var currPage = 1;
var numsPerPage = 6;

    $("div.content-single:lt(" + numsPerPage + ")").show();
NLDev / decoder.js
Last active Apr 14, 2018
Decode Syrapt0r's "my final note.txt" file by bitshifting it. See:
View decoder.js
"use strict";
let path = require("path");
let fs = require("fs");
// Copyright (c) 2018 NullDev //
You can’t perform that action at this time.