Skip to content

Instantly share code, notes, and snippets.

Jakub Gadkowski jakubgg

  • Amsterdam, Netherlands
Block or report user

Report or block jakubgg

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
@jakubgg
jakubgg / Readme.md
Last active Apr 7, 2017
Titanium hack to add search icon to sectionIndexTitles in ListView for iOS
View Readme.md

#Purpose I was struggling with sectionIndexTitles in Titanium. I wanted to mimic the functionality of having the 'search icon' on top of my index bar on the right hand side of the listView, that would additionaly scroll all the way back to the searchBar. So after a couple of hours of poking here and there and using a bigger hammer when I was in doubt, I came up with this quick hack.

#Solution Download TiUIListView-searchIcon.patch.

Navigate to your Titanium SDK files (~/Library/Application Support/Titanium/mobilesdk/osx/3.2.3.GA/iphone/Classes/).

Drop the patch file there.

@jakubgg
jakubgg / build_version.sh
Created May 30, 2014
Titanium automatic build version helper
View build_version.sh
#!/usr/bin/env node
var fs = require('fs');
fs.readFile('./tiapp.xml', 'utf8', function (err, data) {
if (err) throw err;
incrementBuild(data);
});
function incrementBuild (data) {
var lastBuild = data.match(/(?!name="build">)[0-9]+(?=<\/property>)/);
@jakubgg
jakubgg / ngglinkinject.js
Last active Dec 29, 2015
Inject link and redirect for specific slide for Wordpress NextGEN gallery
View ngglinkinject.js
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
/**
* Inject link and redirect for specific slide for Wordpress NextGEN gallery
* (c) 2013 Code Lens | Jakub Gadkowski
* Licenced under Creative Commons Attribution 4.0 International Public License http://creativecommons.org/licenses/by/4.0/
*/
window.addEventListener('load', function(){
@jakubgg
jakubgg / testlocalstorage.js
Last active Dec 15, 2015
JavaScript function to test (a bit brute force test) how much space is allocated for localStorage in a browser, if there are already entries in the localStorage it will show how much space is left.
View testlocalstorage.js
/**
* Function to test how much space is allocated for localStorage in a browser,
* if there are already entries in the localStorage it will show how much space is left.
* console.logs commented out because IE is tripping over them.
*/
function testLocalStorage(){
var timeStart = Date.now();
var timeEnd, countKey, countValue, amountLeft, itemLength;
var occupied = leftCount = 0;
//create localStorage entries until localStorage is totally filled and browser issues a warning.
You can’t perform that action at this time.