Skip to content

Instantly share code, notes, and snippets.

View adelciotto's full-sized avatar

Anthony Del Ciotto adelciotto

  • Melbourne, Australia
View GitHub Profile
@adelciotto
adelciotto / lisp.js
Created April 14, 2018 06:23
Tiny and simple lisp implementation in node
class Env {
constructor(p, e = {}) {
this.p = p;
this.e = e;
}
get(name) {
let val = this.e[name];
if (typeof val !== 'undefined')
@adelciotto
adelciotto / constants.js
Last active August 29, 2015 14:24
getup.js: A node script that reminds me to get off my ass during long sessions at the computer
/* ----------------------------------------------------------------------------
* constants.js
* Author: Anthony Del Ciotto
* Date: 09/07/2015
* ---------------------------------------------------------------------------- */
module.exports = {
ROOT_PATH: require('path').dirname(require.main.filename),
DEFAULT_INITIAL_INTERVAL: 50 * (60 * 1000), // 50 mins in ms
@adelciotto
adelciotto / anagram.js
Last active August 29, 2015 14:21
Anagram Check JS
var START_ASCII_VALUE = 97;
/**
* isAnagram(a, b)
* Returns true if two words are anagrams
* i.e: have the exact same letters regardless of order
* e.g: silent === listen
*/
function isAnagram(a, b) {
// firstly check if the two strings have an unequal length