This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if the namespace 'KEB' is available globally | |
if (!KEB) { | |
// If it is, then assign an object to the 'KEB' variable, and you have your namespace! | |
var KEB = {}; | |
} | |
// Write a variable (attribute) to the namespace | |
KEB.name = "KEB"; | |
// Write a function (method) to the namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple folder-to-folder backup of local projects to Dropbox | |
CORRECTPATH="/home/username/Desktop/local_projects" | |
CHECKPATH=$(pwd) | |
if [ $CHECKPATH = $CORRECTPATH ]; then | |
cp -a ./* ~/Dropbox/local_projects_backup | |
echo "Backup success! :)" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Promises in HTML5 + ES6</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<header> | |
<h1>Promises in HTML5 + ES6</h1> | |
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// find duplicate files with Node.js, cuz, you know, it's useful | |
var Promise = require('bluebird'); | |
var fs = Promise.promisifyAll(require('fs')); | |
var crypto = require('crypto'); | |
var path = require('path'); | |
var pathA = "."; // folder you're in, wherever that might be | |
var pathB = "/path/to/the/directory/you/want/to/compare/it/to"; // yes, yes, argv, etc, but I haven't bothered yet, ok! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bits and bytes</title> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
#form input { | |
width:1em; | |
} | |
td { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Tic Toc</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<header> | |
<h1>Tic Toc</h1> | |
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Example of using callbacks in JavaScript</title> | |
<meta charset="utf-8" /> | |
<style type="text/css"></style> | |
</head> | |
<body> | |
<header> | |
<h1>Simulation of delayed callback functionality</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Movable Element</title> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
#testBox { | |
/* define shape and colour */ | |
width: 50px; height: 50px; | |
background-color: #ddd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Standard Deviation</title> | |
<meta charset="utf-8"> | |
<style type="text/css"></style> | |
</head> | |
<body> | |
<header> | |
<h1>Standard Deviation</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/usr/local/mysql/bin:$PATH | |
export PS1="\u \\$ \[$(tput sgr0)\]" | |
alias nj='cd /Users/username/Dropbox/node' | |
alias home='cd ~' |
OlderNewer