Skip to content

Instantly share code, notes, and snippets.

View c4y's full-sized avatar

Oliver Lohoff c4y

View GitHub Profile
@leofeyer
leofeyer / contao-db-update.php
Created August 9, 2012 13:04
Update path in database
<?php
// Database credentials
$strHost = 'localhost';
$strUser = '';
$strPassword = '';
$strDatabase = '';
// From and to path
$strFrom = 'tl_files/';
@adampax
adampax / app.js
Created September 7, 2011 14:52 — forked from dawsontoth/app.js
Generate QR Codes in Titanium Mobile
/**
* Creates an image view using Google's QR Code generator.
* @param text The text to be encoded in the QR code
* @param size The size of the QR code; Possible Sizes: 100x100, 150x150, 200x200, 250x250, 300x300, 350x350, 400x400, 500x500
*/
function createQRCodeImageView(text, size) {
var url = 'http://chart.apis.google.com/chart?cht=qr&chs=' + size + '&chl=' + encodeURI(text) + '&chld=H|0';
var width = size.split('x')[0], height = size.split('x')[1];
if (Ti.Android) {
width += 'dp';