Skip to content

Instantly share code, notes, and snippets.

View NullDev's full-sized avatar
:octocat:
(◕‿◕)

NullDev // Chris NullDev

:octocat:
(◕‿◕)
View GitHub Profile
@NullDev
NullDev / keybase.md
Last active January 18, 2021 09:20
Keybase.io Identity Prove

Keybase proof

I hereby claim:

  • I am NullDev on github.
  • I am nulldev (https://keybase.io/nulldev) on keybase.
  • I have a public key whose fingerprint is 74A6 33A3 4DDA C6AB BDB6 01DD C2B3 DE4E F07F 9125

To claim this, I am signing this object:

@NullDev
NullDev / colors.sh
Created November 15, 2017 13:10
Bash/Shell Colors
# Regular Colors
\[\033[0;30m\] # Black
\[\033[0;31m\] # Red
\[\033[0;32m\] # Green
\[\033[0;33m\] # Yellow
\[\033[0;34m\] # Blue
\[\033[0;35m\] # Purple
\[\033[0;36m\] # Cyan
\[\033[0;37m\] # White
@NullDev
NullDev / Stackoverflow-Snippets.md
Created November 27, 2017 20:39
Useful Stackoverflow formatting snippets

Button

Code:

<kbd>**[Live Demo](http://jsfiddle.net/)**</kbd>

Preview:

Screenshot

@NullDev
NullDev / jsfiddle_DOM.md
Last active December 14, 2017 08:35
jsfiddle console.log to DOM

HTML:

<div id="t"></div>

JS:

var console={log:function(t){document.getElementById("t").innerHTML+=t+""}};
@NullDev
NullDev / dev_tools_detect.md
Last active November 26, 2020 16:46
Hack to detected whether the developer tools of the browser are open

UPDATE:

This does not work on recent versions of Chrome and FireFox!


This is a hack to detected whether the developer tools of the browser are open or closed. It also works if the development tools are not docked.

HTML Code:

@NullDev
NullDev / vc-fix.md
Last active April 27, 2018 12:52
Visual Composer iPad height fix

This is a (temporary fix) for visual composer messing up heights of grid elements on iPads.
Basically, visualcomposer just parses the device width and height very sloppy.
this results in a height property like this:

element {
    height: 314x301;
}
@NullDev
NullDev / decoder.js
Last active April 14, 2018 16:13
Decode Syrapt0r's "my final note.txt" file by bitshifting it. See: http://code17.wikia.com
"use strict";
let path = require("path");
let fs = require("fs");
////////////////////////////////
//----------------------------//
// Copyright (c) 2018 NullDev //
//----------------------------//
////////////////////////////////
@NullDev
NullDev / pagination.md
Last active April 25, 2018 12:59
Pagination Example

JS:

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

$(document).ready(function(){
    $("div.content-single").hide();
    $("div.content-single:lt(" + numsPerPage + ")").show();
@NullDev
NullDev / ChainFunction.js
Last active November 15, 2018 14:58
Global Chain function example with prototyping
Function.prototype.test = function(x){
var arg1 = this();
var arg2 = x;
console.log(
"Arg1: " + arg1 +
"\nArg2: " + arg2
);
}
@NullDev
NullDev / SpaceShip.js
Last active February 3, 2022 19:23
A weird implementation of PHP's Spaceship operator in JavaScript
Number.prototype["<=>"] = function(x){
return Math.sign(this - x);
}
var result = 5 ["<=>"] `4`;
console.log(result);
// https://jsfiddle.net/veyar51m/