Skip to content

Instantly share code, notes, and snippets.

@40
40 / testCode.js
Created Nov 17, 2013
testing code
View testCode.js
$.ajax({
url: "http://fiddle.jshell.net/favicon.png",
beforeSend: function( xhr ) {
xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
}
})
.done(function( data ) {
if ( console && console.log ) {
console.log( "Sample of data:", data.slice( 0, 100 ) );
}
@40
40 / txtbb10
Created Jun 15, 2013
txt bb10 code
View txtbb10
http://supportforums.blackberry.com/t5/Cascades-Development/How-to-invoke-quot-Text-Messages-quot-app-to-compose-sms-from/td-p/2252489
@40
40 / gist:5688010
Created May 31, 2013
Create new subdomain
View gist:5688010
#replace test.myaddress.com with subdomain
<VirtualHost *:80>
ServerName test.my.address.com
ServerAdmin webmaster@my.address.com
DocumentRoot /var/www/test.my.address.com/
<Directory />
Options FollowSymLinks
@40
40 / speakers.xml
Created May 12, 2013
why is this breaking?
View speakers.xml
<root>
<item name="Travis Allen" title="Software Developer, BlackBerry" image="http://www.blackberryjamconference.com/assets/img/content/speaker-no-photo.jpg" details="Travis is a software developer at BlackBerry with over 7 years of experience. He works on a team focused on the developer experience inside Momentics providing plugins to enhance productivity." fullpro="http://www.blackberryjamconference.com/americas/content/speakers/breakout/6824/travis-allen" />
<item name="Tom Anderson" title="Mgr, BlackBerry Developer Evangelist, BlackBerry" image="http://cdn.images.rimconferenceresources.com/201301/mobileapi/speaker/photo/1601/userPhoto.jpg" details="Tom Anderson – Senior BlackBerry Developer Evangelist – Tom started his career in 1986 with Microsoft Corporation where he was a Program Manager on such products as Windows 3.11, Windows for Workgroups, Windows 95, and Internet Explorer. He was also ..." fullpro="http://www.blackberryjamconference.com/americas/content/speakers/breakout/2656/tom-anderson" />
@40
40 / doc.link
Created May 10, 2013
expose lists to qml
View doc.link
@40
40 / gist:5546149
Created May 9, 2013
kendo nice chart
View gist:5546149
http://jsfiddle.net/burkeholland/JwDZN/light/
@40
40 / dappend.link
Created May 9, 2013
dynamic append remove using jquery
View dappend.link
@40
40 / bb10 detect
Created May 6, 2013
detect BlackBerry 10 using php useragent
View bb10 detect
<?php
/**
* Mobile Browser Detection for PHP.
*/
$useragent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/BB10/i',$useragent))
{
echo 'BLACKBERRY 10, <br />';
echo $useragent;
@40
40 / sortarray
Created May 4, 2013
sort an array in javascript
View sortarray
var numberArray = [40, 1, 5, 200];
function compareNumbers(a, b) {
return a - b;
}
document.getElementById("sorted").innerHTML =numberArray.sort(compareNumbers);
@40
40 / .pro
Created Apr 7, 2013
Make Call in BB10
View .pro
LIBS += -lbbsystem