Skip to content

Instantly share code, notes, and snippets.

View codylindley's full-sized avatar

Cody Lindley codylindley

View GitHub Profile
@codylindley
codylindley / gist:2033972
Created March 14, 2012 04:02
Find limit of recursion
var recurse = function(depth){
try{
return recurse(depth + 1);
}catch(ex){
return depth;
}
};
console.log(recurse(1));
var message = 'Spoon!';
$('#foo').bind('click', {msg: message}, function(event) {
alert(event.data.msg);
});
message = 'Not in the face!';
$('#bar').bind('click', {msg: message}, function(event) {
alert(event.data.msg);
});
@codylindley
codylindley / gist:894988
Created March 30, 2011 18:45
ie8 + <header> + jQuery = weird
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://ajax.cdnjs.com/ajax/libs/modernizr/1.7/modernizr-1.7.min.js"></script>
<style>header{height:100px}</style>
</head>
<body>
We couldn’t find that file to show.
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://ajax.cdnjs.com/ajax/libs/modernizr/1.7/modernizr-1.7.min.js"></script>
<style>header{height:100px}</style>
</head>
<body>
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
bar[foo?'doSomething':'doSomethingElse'](el);
(function ($) {
$.fn.center = function () {
return this.each(function () {
var top = ($(window).height() - $(this).outerHeight()) / 2;
var left = ($(window).width() - $(this).outerWidth()) / 2;
$(this).css({
position: 'absolute',
margin: 0,
top: (top > 0 ? top : 0) + 'px',
left: (left > 0 ? left : 0) + 'px'
/*!
* jQuery.preloadImg
* description: cache images via $.preloadImg(['src','src']) or $('img').preloadImg()
* author: Cody Lindley
*/
(function($) {
$.preloadImg = function() {
$.preloadImg.runLoader(arguments[0]);
/*recent orders*/
before(function(context) {
var email = context.store.get('email');
if(email) {
var foo = context.cache();
console.log(foo.recentOrders);
if(foo.recentOrders){
context.partial('templates/previous_orders/recent.mustache', PreviousOrdersView(context.cache().recentOrders), function(html) {
As the video says, I think your position on the matter is intellectually dishonest. The very origins of the word
atheism makes a positive assertion "without gods". Does Hitchens follow your line of reasoning? From what I know
of his book, its not a single sentence (or more) requesting proof.
Like I've stated, the burden of proof in this case are on both parties because both an atheist and a christian
are making claims. Trivial wordings aside. We should set this proof thing aside. I think we agree in theory
that if you assert you have a burden of proof requirement.
Here a few more comments: