Skip to content

Instantly share code, notes, and snippets.

View jamesbaber's full-sized avatar

James Baber jamesbaber

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jamesbaber on github.
  • I am jamesbaber (https://keybase.io/jamesbaber) on keybase.
  • I have a public key whose fingerprint is 6D2C 02D8 5BC1 4E65 C13C 96FF AB75 D222 6482 B782

To claim this, I am signing this object:

@jamesbaber
jamesbaber / forceHTTPS.html
Created March 1, 2016 14:38
HTML Script Tag to Force HTTPS (SSL) on a Webpage
<script>
if (window.location.protocol != "https:")
window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
</script>
@jamesbaber
jamesbaber / removeDeadEnemies.js
Last active March 1, 2016 14:41
Removing object from array depending on value
function IsDead( enemy ) {
if (enemy.health <= 0) {
return true;
} else {
return false;
}
}
function RemoveDead(enemy) {
var deadEnemies = enemys.find(IsDead);