Skip to content

Instantly share code, notes, and snippets.

<?php include 'header.html'; ?>
<div id="container">
<div id="header">
<img src="images/bluegreenyoulllookgreat.jpg" alt="You'll Look Great" />
<h2>We are in the business of brand makeovers.</h2>
<h3>Find out what we can do for you.</h3>
</div>
num = 100
while num >= 1
num = num - 1
puts num.to_s + ' bottles of beer on the wall, ' + num.to_s + ' bottles of beer! Take one down, pass it around, ' + (num - 1).to_s + ' bottles of beer on the wall!'
end
@nbashaw
nbashaw / New Project Maker
Created December 22, 2010 23:06
A little ruby script to start out new projects for me
# Make the project folder
Dir.mkdir("New_Project")
# Navigate to the project folder
Dir.chdir("New_Project")
# Make the index.html file
File.new("index.html", "w+")
# Make the internal project folders
@nbashaw
nbashaw / css
Created January 3, 2011 04:06
make any site feel more tactile instantly
a:active {
position: relative;
top: 3px;
}
@nbashaw
nbashaw / gist:842292
Created February 24, 2011 15:22
guessing game
var answer = Math.floor(Math.random()*11);
var guesscount = 0;
while (guess != answer) {
var guess = Number(prompt("Guess what number I'm thinking of."));
var guesscount = guesscount + 1;
if (guess > answer){ alert("Too high!"); }
else if (guess < answer){ alert("Too low!"); }
else { alert("You guessed it! Only took you " + guesscount + " guesses."); }
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="site description here" />
<title>ctrl+reset</title>
<link rel="stylesheet/less" type="text/css" href="styles.less">
<script src="less.js" type="text/javascript"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
@nbashaw
nbashaw / birthday.rb
Created May 2, 2011 00:40
Program to find the probability that n people all have different birthdays
# Program to find the probability that n people all have different birthdays
class ::Fixnum
def factorial
result = self
self.times do |n|
result *= (self - n) if not n == 0
end
result
end
→How long should it take for you to get data from me after I have everything all set up?
Jeremy Linden: hi
Jeremy Linden: you should see data pretty much immediately
→hmmm then I must not be setting this up right - I'm trying to do a little testing to see how a/b tests work in mixpanel
Jeremy Linden: what you would do is set a super property A or B
Jeremy Linden: then that user is tied to that cohort
→as explained in this blog post? http://blog.mixpanel.com/ab-test
Jeremy Linden: no, that is obsolete actually
Jeremy Linden: should probably remove it
Jeremy Linden: it's more simple than that really
<!-- this is wrong -->
<head>
<body>
<h1> <p> This is the first paragraph in large text, ever</p></h1>
</body>
</head>