Skip to content

Instantly share code, notes, and snippets.

View kbshl's full-sized avatar

Konstantin Büschel kbshl

  • Marburg, Hessen, Deutschland
  • 22:47 (UTC +02:00)
  • X @iskostja
View GitHub Profile
sudo find /private/var/folders/ \ -name com.apple.dock.iconcache -exec rm {} \;
sudo find /private/var/folders/ \ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
@kbshl
kbshl / open_webview_link_in_new_view.js
Created May 30, 2016 09:05
Appcelerator Titanium: Open link clicks from remote web view in system or other view
@kbshl
kbshl / main.rb
Last active April 25, 2016 16:35 — forked from anonymous/main.rb
search my bitbucket repositories
#!/usr/bin/env ruby
# encoding: utf-8
require 'rubygems' unless defined? Gem # rubygems is only needed in 1.8
require_relative "bundle/bundler/setup"
require "alfred"
require 'json'
basic_user = ENV['BB_USER_NAME']
basic_password = ENV['BB_PASSWORD']
adb shell 'pm list packages -f -3' | sed -e 's/.*=//' | sort
@kbshl
kbshl / unzip_to_dir.sh
Created April 17, 2016 11:58
Unzip file into specific directory
unzip -o <ZIP_FILE> -d <DESTINATION_DIR>
@kbshl
kbshl / uninstall_ios_sim.sh
Created April 14, 2016 18:21
Uninstall app with given bundle identifier from booted simulator
xcrun simctl uninstall booted <BUNDLE_IDENTIFIER>
@kbshl
kbshl / curl_header.sh
Created April 14, 2016 18:18
Get header from url request with cURL
curl -I <URL>
@kbshl
kbshl / reset_ios_sim.sh
Created March 7, 2016 13:42
Resetting the iOS Simulator
xcrun simctl erase all
@kbshl
kbshl / Q&A
Created February 12, 2016 14:37
Android orientation locking for Titanium - Originally posted on http://bencoding.com/2016/02/11/android-orientation-locking-for-titanium/
Q: Why lock at the Android Activity level, isn’t adding the Alloy style enough?
A: Unfortunately no. The Alloy style is applied after the window is created. So
if the device is held in a landscape orientation you will see the window open and
turn. Locking at the Android Activity level stops this behavior.
Q: Does this mean all of my Ti.UI.Window object will be locked in portrait?
A: Yes, this locks both at the Android Activity and Titanium object levels.
Q: Can I later change the orientation by updating my Ti.UI.Window orientation?
A: No, orientation is locked at the Android Activity level as well.