Skip to content

Instantly share code, notes, and snippets.

Joshua Lambert joshualambert

Block or report user

Report or block joshualambert

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
View gist:ba5d6bbe98bc9b8124e8a04648df9d20
// Used to prompt a user for how to open an address, or open automatically, based on the platform.
function openAddress(destAddr, startAddr) {
var destParam = '';
var startParam = '';
if (typeof destAddr !== 'undefined') {
destParam = '&daddr=' + encodeURIComponent(destAddr);
}
if (typeof startAddr !== 'undefined') {
startParam = '&saddr=' + encodeURIComponent(startAddr);
}
@joshualambert
joshualambert / bitly.js
Last active Sep 29, 2017
Titanium BitLy CommonJS Library
View bitly.js
/*
* Used to interact with the Bit.LY API.
* Written by: Josh Lambert
* Twitter: @zettageek
* Email: hi@centrevilletech.com
* Version: 1.0
*/
var apiKey,
apiVersion = 'v3',
View gist:05df65992ff884e81e04
Verifying I am +joshlambert on my passcard. https://onename.com/joshlambert
View gist:c8171ab4afdbc7f2a768
http://ftp.bmshelp.com/downloads/BMSRuntimes.exe
http://ftp.bmshelp.com/downloads/Foxreg.zip
http://ftp.bmshelp.com/downloads/SMB2_d.bat
http://ftp.bmshelp.com/downloads/Msxml.msi
http://link.bmshelp.com/
View .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]+)/([^/]*)$ resize.php?size=$1&file=$2
View gist:ced68ec5a6f2825611c6
LOVs.
——————————
There are two types of LOVs:
1) Static - A set list of options in APEX.
- Static = Entries are automatically alphabetized
- Static2 = Entries are displayed in the order that they’re entered.
2) Dynamic - Based on SQL against the database.
LOVs can be defined as either:
a) A shared component.
View gist:243355ce77d8e1f7324d
<activity android:name=".MyAppActivity" android:label="@string/app_name" android:theme="@style/Theme.Titanium" android:configChanges="keyboardHidden|orientation" android:alwaysRetainTaskState="true" android:launchMode="singleInstance">
<intent-filter>
<data android:scheme="myapp" android:host="app"/>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
View gist:10415383
- [ ] Reviewed
- [ ] Tested
- [ ] Approved
@joshualambert
joshualambert / hintTextShim
Created Jan 2, 2014
hintText shim for Appcelerator's Titanium allowing hintText to be colored. Simply call this function after creating each textfield, and pass the option isPswd boolean if you're dealing with a password field.
View hintTextShim
// Used to fake hintText coloring to the font color.
// Requires hintText to be defined on the object being passed.
function hintTextShim(uiObject, isPswd) {
uiObject.objectFocus = function () {
if (uiObject.value === uiObject.hintText) {
if (typeof isPswd !== 'undefined' && isPswd === true) {
uiObject.passwordMask = true;
}
uiObject.value = '';
}
View gist:6501802
$query = mysqli_query($connection,"INSERT INTO `child_menu_details` (`id`, `parent_id`, `child_id`, `date`, `lunch`, `side1`, `side2`, `side3`, `side4`, `size`, `smoothie`, `orderDate`)
VALUES (NULL, '".$parentid."', '".$childid."', '".$date."' ,'".$lunch."', '".$side1."', '".$side2."', '".$side3."', '".$side4."', '".$size."', '".$smoothie."', '".$orderDate."')");
You can’t perform that action at this time.