Skip to content

Instantly share code, notes, and snippets.

View bnb's full-sized avatar

Tierney Cyren bnb

View GitHub Profile
@bnb
bnb / callbackhell.js
Created September 6, 2014 15:59
Welcome to callback hell.
$('.title')
.typetype("Hello there.", { e: 0.04, t: 100,})
.backspace(
12,
{
t: 75,
callback: function() {
$('.title')
.delay(1122)
.typetype("I am &!", { e: 0.04, t: 100,})
@bnb
bnb / index.html
Last active August 29, 2015 14:06
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8"/>
<title>&! - bnb, bitandbang - Student Web Designer and Developer</title>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="./css/main.css" rel="stylesheet">
@bnb
bnb / animations.js
Last active August 29, 2015 14:06
Need help figuring out how to make the backgrounds animate back to their originals.
// Hover effects on services
var oldBG1 = $('.widItem.1').css('background-color');
var oldBG2 = $('.widItem.2').css('background-color');
var oldBG3 = $('.widItem.3').css('background-color');
$('.widItem').hover(
function() {
$(this)
.addClass('widAnim')
.animate({
@bnb
bnb / gist:8bc47e1fb430a4619fb5
Created October 21, 2014 01:36
That's a lot of script includes
<head>
<meta charset="utf-8" />
<title>
Whiteout Mail
</title><!-- Theses CSP rules are used as a fallback in runtimes such as Cordova -->
<meta http-equiv="Content-Security-Policy" content=
"default-src 'self' chrome-extension: file: gap:; object-src 'none'; script-src 'self' 'unsafe-eval' chrome-extension: file: gap:; connect-src *; style-src 'self' 'unsafe-inline' chrome-extension: file: gap:; img-src 'self' chrome-extension: file: gap: data:" />
<!-- iOS homescreen link -->
<meta name="apple-mobile-web-app-capable" content="yes" /><!-- iOS iPad icon (retina) -->
<link rel="apple-touch-icon" sizes="152x152" href="img/icon-152-ios.png" /><!-- iOS iPhone icon (retina) -->
if(!isset($_GET['entity'])){
header('HTTP/1.0 400 Bad Request');
header('Link: <?entity=some-entity-uri>, rel="Usage";'); //Is the entity here...
die();
}
$entity = $_GET['entity']; //...the same as the entity in the GET request here? If not, where is the one in the GET request coming from?
@bnb
bnb / hello.js
Created January 30, 2015 22:28
Solution for Problem One of ExpressWorks that doesn't work.
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.end('Hello World!');
});
app.listen(process.argv[2]);
@bnb
bnb / factorial.js
Created January 30, 2015 23:15
CoderByte Challenge 2
function FirstFactorial(num) {
var finalNum = 0;
for(i = num; i < num; i--) [
finalNum *= i;
}
// code goes here
return finalNum;
}
@bnb
bnb / enemies.types.js
Created January 31, 2015 23:23
Types of enemies in Nostalgic Shock Carnage. (Excerpt)
public var enemy.types = {
base: {
base,
strong,
strongest
},
strong: {
base,
strong,
strongest
@bnb
bnb / gist:1721f9de65543a859166
Created February 8, 2015 02:32
Extremely Simple Grid System
/*
Column CSS
*/
.clear {
clear: both;
}
@bnb
bnb / mountains.js
Created February 9, 2015 21:53
First JavaScript Program!
function landscape() {
var toLog = '';
var flat = function(num) {
for(var i = 0; i < num; i++) {
toLog += '_';
}
}
var mountain = function(num) {