This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The service connection class that allows you to talk to the MediaPlayer Service | |
* | |
* @author "Sudar Muthu (http://sudarmuthu.com)" | |
* | |
*/ | |
private class MediaPlayerServiceConnection implements ServiceConnection { | |
public com.htc.music.IMediaPlaybackService mServiceHtc; | |
public com.android.music.IMediaPlaybackService mServiceAndroid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('geoplugin.class.php'); | |
$geoplugin = new geoPlugin(); | |
$geoplugin->locate(); | |
echo get_posts_by_tag("{$geoplugin->city},$geoplugin->region}", 5); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConditionalCompile { | |
private static final Logger LOGGER = Logger.getLogger(ConditionalCompile.class); | |
private final static boolean doLogging = false; | |
public static void importantMethod( ) { | |
// Do some set up code. | |
if (doLogging) { | |
LOGGER.debug("Set up complete, beginning phases."); | |
} | |
// do first part. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ADK demo start | |
ADK Init | |
ADK protocol rev. 1 | |
Accessory mode switch attempt | |
ADK Init | |
Acc.mode device detected | |
Endpoint Structure: | |
EP0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>PHP Workshop</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<h1>PHP Workshop</h1> | |
<p id = "special">The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. | |
</p> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gist id = "{GIST_ID}" file = "{GIST_FILE}"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Expand short urls | |
* | |
* @param <string> $url - Short url | |
* @return <string> - Longer version of the short url | |
*/ | |
function expand_url($url){ | |
//Get response headers | |
$response = get_headers($url, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Making text unselectable</title> | |
<style> | |
body { | |
*-moz-user-select: none; | |
*-khtml-user-select: none; | |
*user-select: none; | |
} | |
.unselectable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script> | |
<script type="text/javascript"> | |
YUI().use('node', 'yql', function(Y) { | |
var res = Y.one('#res'), | |
zip = '90210'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rsync command to sync two folders | |
rsync --verbose --progress --stats --compress --rsh=ssh \ | |
--recursive --times --links -u --rsh='ssh -p8023' \ | |
--exclude "*.sh" --exclude "*~" --exclude "*.svn" --exclude "*.git" --exclude "nbproject" --exclude ".DS_Store" \ | |
/path/to/local/file/ myserver.org:/path/in/remote/server/ |