Skip to content

Instantly share code, notes, and snippets.

Brennan Novak bnvk

Block or report user

Report or block bnvk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bnvk
bnvk / LICENSE.txt
Created Nov 8, 2011 — forked from aemkei/LICENSE.txt
Latitude Longitude Distance - 140byt.es
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bnvk
bnvk / LICENSE.txt
Created Nov 8, 2011 — forked from OiNutter/LICENSE.txt
Credit Card Validation similar to the Luhn Algorithm
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Will McKenzie<www.oinutter.co.uk>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View gist:926612
$url = 'https://github.com/socialigniter/blog/zipball/master';
$options = array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_FOLLOWLOCATION => 1,
);
$ch = curl_init($url);
View gist:857199
Request URL:http://nerdout.me/api/nerdout/create_checkin
Request Method:POST
Status Code:200 OK
Request Headers
Accept:application/json, text/javascript, */*; q=0.01
Authorization:OAuth realm="",oauth_consumer_key="00931ed93a8d5ddab03e6cba3a22482404d733e63",oauth_token="e2a9de18fedf4c86d4134f4ac9c0c4db04d733e63",oauth_timestamp="1299408374",oauth_nonce="7SoL8M",oauth_signature_method="HMAC-SHA1",oauth_signature="7hDRwep4VPWV0CUMmvkcdWDIl1s%3D"
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Origin:http://nerdout.me
Referer:http://nerdout.me/home/nerdout/custom
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
View gist:825469
<?php
include('autoloader.php');
include('OAuth.php');
$googleOAuthConsumerKey = 'aaron.pk';
$googleOAuthConsumerSecret = 'XXXXXXXXXXXXXXXXXXXX';
$oAuthAccessTokenSecret = 'XXXXXXXXXXXXXXXXXXXXXXX';
$oAuthAccessToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
@bnvk
bnvk / JavascriptDateFunctions.js
Created Jan 11, 2011
Some simple, yet useful JS date/time functions
View JavascriptDateFunctions.js
// Gets Current Browser Date/Time
var now = new Date();
// Gets Current Browser Timezone
var zone = now.toString().substr(25,6) + ":" + now.toString().substr(31,2);
View SendGrid App Filter Borken!
// Creates Object & arrays
$hdr = new SmtpApiHeader();
$toList = array();
$nameList = array();
$pubkeyList = array();
$BurstCount = 0;
// Loop Que
do {
View PHP include() displaying number 1 after print
I just encountered a weird little quirk of PHP that I spent awhile trying to resolve, so I'm posting this as a Google search turns up nothing.
When including a .php file in the midst of an html/view file using the include() function:
<?= include('myfile.php') ?>
Was producing a number '1' located after the end of include. The issue turns out to be a bug / feature or using short tags:
<?=
View gist:374364
$('.vote_up').live('click', function(eve) {
eve.preventDefault();
var request = $(this).attr('id');
$.get('http://localhost:8888/oncurr.com/build/vote_up/'+request, function(html) {
if(parseFloat(html)) {
$('#vote_'+request).html('+'+html+'<img src=\"http://localhost:8888/oncurr.com/images/graphics/thumbs_up.png\" border\"0\" />');
}else{
$('#vote_'+request).html(html);
}
});
View Confusing array
$home_base_array = array('0' => '--select--', $this->config->item('site_name') => $this->config->item('site_name'));
foreach($this->config->item('social_connections') as $connection) :
$home_base_array[] = array($connection => $connection);
endforeach;
You can’t perform that action at this time.