Skip to content

Instantly share code, notes, and snippets.

View christianbundy's full-sized avatar

Christian Bundy christianbundy

  • 19:16 (UTC -07:00)
View GitHub Profile

Screensizr Height Bug

Here's the bug we're fixing:

Screensizr Bug

As you can see, my viewport is definitely not 604px in height, but it's being reported that way by Screensizr. Why?

#Zero-day Startup

Hi. I'm going to start a project today, and detail my experience with the project.

##Monday

##Tuesday

##Wednesday

@christianbundy
christianbundy / random_uniques.js
Last active December 21, 2015 09:49
Generates a set of random unique integers.
// do not use this
function random_uniques(min, max, num) {
if (max-min > num) {
_result = {};
for (i = 1; i<=num; i++) {
_unique=false;
while (!_unique) {
_new = Math.round((Math.random()*max)+min);
for (j = 1; j<=i; j++) {
# let's assume the command is:
# sshcd -v -q root@example.com:/path/to/file
# grabs the last argument of command, the target: "root@example.com:/path/to/file
t="${!#}"
# command to run, which I've broken down line by line
c=(
"ssh"
"-t" # force pseudo-tty allocation (http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1)
// THE WRONG WAY TO DO IT ////////////////
_([1, 2, 3]).forEach(function(num) { // for numbers 1..3, create a function that takes a `num`
$('div.' + num).click(function () { // when a div with the class `num` is clicked
console.log('you clicked ' + num); // log "you clicked `num`"
}); //
}); //
//////////////////////////////////////////
// THE RIGHT WAY TO DO IT //////////////
var bindToClick = function (num) { // create a function that takes a `num`
// Javascript implementation of the Heartbleed bug
var memory = '';
var heartbleed = function (msg, len) {
if (msg.length === 0) {
throw 'Message must not be blank';
}
len = len || msg.length;

Keybase proof

I hereby claim:

  • I am christianbundy on github.
  • I am christianbundy (https://keybase.io/christianbundy) on keybase.
  • I have a public key whose fingerprint is 17C6 C8F8 B27B 3648 8FE3 4CCE FD27 2ED3 EB5F D1ED

To claim this, I am signing this object:

@christianbundy
christianbundy / was-jesus-a-freak.md
Last active August 29, 2015 13:59
Alan Watts, July 1971

Was Jesus a freak?

A few days ago I gave a ride to a rather pleasant hippie couple who seemed to have no particular destination. I asked, "What trip are you on?" He said, "Like spiritual trip?" I said, "Yes." He said, "We’re on the Jesus trip." "Whose Jesus?" I asked, "Billy Graham’s or mine?" "Well, it’s all sort of the same, isn’t it?" It is not. For Billy Graham follows a long tradition, both Catholic and Protestant, wherein the gospel (or "good news" of Jesus has been eclipsed and perverted by pedestalization, by kicking him upstairs so as to get him out of the way, and by following a religion about Jesus instead of the religion of Jesus. Obviously, Jesus was not the man he was as a result of making Jesus Christ his personal savior. The religion of Jesus was that he knew he was a son of God, and the phrase "son of" means "of the nature of," so that a son of God is an individual who realizes that he is, and always has been, one with God. "I and the Father are one."

When Jesus spoke those words the crow

var createAlert = function (level) {
UI.registerHelper(level, function(title, msg) {
"use strict";
var str = '<strong>' + title + '</strong> ' + msg;
return '<div class="alert alert-' + level + '">' + str + '</div>';
});
}
createAlert('success');
createAlert('info');
// Gaslighting With Javascript
(function () {
var obj = {
fn : function () {}
, num: 1
, obj: {}
, str: 'Hello, world!'
};