Skip to content

Instantly share code, notes, and snippets.

View hghmn's full-sized avatar

Nathan Hughes hghmn

View GitHub Profile
@hghmn
hghmn / logger.js
Created September 11, 2015 04:58
simple JavaScript logging utility
/* logger */
// define the styles we'll use for logger
var cssText = [
"position: fixed;",
"height: 80px;",
"bottom: 0px;",
"left: 0;",
"right: 0;",
"margin: 0;",
@hghmn
hghmn / is-integer-palindrome-maths.js
Last active August 29, 2015 14:24
Given an integer, determine if it is a palindrome using only mathematical operations.
/**
* Given an integer, determine if it is a palindrome using only mathematical operations
* @param {Integer} num - an integer number to be tested for palindromy-ness
*/
function isIntegerPalindrome( num ) {
// all single digits are by definition palindromes
if( num < 10 ) {
return true;
}