Skip to content

Instantly share code, notes, and snippets.

@40
40 / testCode.js
Created November 17, 2013 00:39
testing code
$.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 June 15, 2013 06:01
txt bb10 code
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 21:07
Create new subdomain
#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 03:23
why is this breaking?
<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 00:27
expose lists to qml
@40
40 / gist:5546149
Created May 9, 2013 07:56
kendo nice chart
http://jsfiddle.net/burkeholland/JwDZN/light/
@40
40 / dappend.link
Created May 9, 2013 01:48
dynamic append remove using jquery
@40
40 / bb10 detect
Created May 6, 2013 23:00
detect BlackBerry 10 using php useragent
<?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 17:22
sort an array in javascript
var numberArray = [40, 1, 5, 200];
function compareNumbers(a, b) {
return a - b;
}
document.getElementById("sorted").innerHTML =numberArray.sort(compareNumbers);
@40
40 / .pro
Created April 7, 2013 02:34
Make Call in BB10
LIBS += -lbbsystem