Skip to content

Instantly share code, notes, and snippets.

View champierre's full-sized avatar

Junya Ishihara champierre

View GitHub Profile
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (dispatch_queue_create != NULL) {
dispatch_release(timeline_queue);
dispatch_release(image_queue);
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"SampleTable";
if (!tweetMessages) {
UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
cell.textLabel.text = @"loading...";
cell.textLabel.textColor = [UIColor grayColor];
return cell;
}
@champierre
champierre / app.js
Created April 9, 2011 16:21
Effect like Path - Titanium app.js
//
// Base
//
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
@champierre
champierre / gist:934027
Created April 21, 2011 09:05
enable to use Japanese in irb
rvm package install readline
rvm remove 1.9.2
rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
@champierre
champierre / scratch_plus.user.js
Created June 30, 2011 17:01
An user script that adds Twitter button and Facebook Like button to Scratch project pages. You can use this as Chrome extension or as a greasemonkey script for Firefox.
// ==UserScript==
// @title Scratch Plus
// @description Add Twitter button and Facebook Like button to Scratch project pages.
// @namespace http://tsukurusha.com
// @include http://scratch.mit.edu/projects/*
// ==/UserScript==
var pactions = document.getElementById('pactions');
var buttons = document.createElement('div');
var twitter_button = document.createElement('span');
// ==UserScript==
// @title Chofu Library Auto Login
// @description Fill out login info for chofu library reservation system
// @namespace http://blog.champierre.com
// @include https://www.lib.city.chofu.tokyo.jp/cgi-bin/entry
// ==/UserScript==
document.getElementsByName('UID')[0].value = '1234567-8'
document.getElementsByName('PASS')[0].value = '1234'
document.getElementsByName('CONTACT')[0].childNodes[0].selected = true
121 function wxr_cdata( $str ) {
122 if ( seems_utf8( $str ) == false )
123 $str = utf8_encode( $str );
124
125 // $str = ent2ncr(esc_html($str));
126 $str = str_replace(']]>', ']]]]><![CDATA[>', $str); // <= Add This
127 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '' ) . ']]>';
367 <guid isPermaLink="false"><?php esc_url( the_guid() ); ?></guid>
368 <description></description>
369 <content:encoded><?php echo wxr_cdata( apply_filters( 'the_content_export', wpautop( $post->post_content ) ) ); ?></content:encoded>
370 <excerpt:encoded><?php echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); ?></excerpt:encoded>
@champierre
champierre / library_auto_login.user.js
Created December 2, 2011 11:18
Fill out login info for the library reservation system
// ==UserScript==
// @title Library Auto Login
// @description Fill out login info for the library reservation system
// @namespace http://blog.champierre.com
// @include https://anylibrary.url/clis/entry <== REPLACE THIS
// ==/UserScript==
document.getElementsByName('UID')[0].value = UID; <== REPLACE THIS
document.getElementsByName('PASS')[0].value = PASS; <== REPLACE THIS
document.getElementsByName('CONTACT')[0].childNodes[3].selected = true;
Is it possible to create your own WebView(not the one that DroidGap provides) and make PhoneGap work on it on Android?
I have an existing Android project which has my own WebView. I want to extend that WebView so that PhoneGap can be used on it.
What I want to do is similar to:
Cleavage
http://blogs.nitobi.com/jesse/2010/04/20/introducing-iphone-cleavage/
but on Android.