- http://chris.banes.me/2014/07/04/palette-preview/
- http://antonioleiva.com/recyclerview/
- http://www.doubleencore.com/2013/05/layout-inflation-as-intended/
- http://cyrilmottier.com/2011/11/23/listview-tips-tricks-4-add-several-clickable-areas/
- http://lucasr.org/2012/04/05/performance-tips-for-androids-listview/
- http://www.developerphil.com/parcelable-vs-serializable/
- http://flavienlaurent.com/blog/2013/08/28/each-navigation-drawer-hides-a-viewdraghelper/
- http://petrnohejl.github.io/Android-Cheatsheet-For-Graphic-Designers/
- http://www.androidzeitgeist.com/2013/08/read-code-intentservice.html?
- http://omgitsmgp.com/2013/09/09/a-conservative-guide-to-proguard-for-android/
This file contains 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
from twilio.rest import TwilioRestClient | |
class TwilioSMS: | |
def __init__(self): | |
self.account_sid = "AC0b56c1b6b1ff87e0caaf2c41ee5a7380" | |
self.auth_token = "d788a0bac58674a4efdd8fdb86c201a6" | |
def viewsms(self): |
This file contains 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
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.webkit.WebChromeClient; | |
import android.webkit.WebSettings; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { | |
private WebView webview; |
This file contains 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
/** | |
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session | |
* app. | |
* @author Dandré Allison | |
*/ | |
public class AccountUtils { | |
/** | |
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}. | |
*/ |
This file contains 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
# Load Json into a Python object | |
import urllib2 | |
import json | |
req = urllib2.Request("http://localhost:81/sensors/temperature.json") | |
opener = urllib2.build_opener() | |
f = opener.open(req) | |
json = json.loads(f.read()) | |
print json | |
print json['unit'] |
This file contains 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
# See also http://wiki.xbmc.org/index.php?title=Autoexec.py | |
# Put this into the userdata folder, see http://wiki.xbmc.org/index.php?title=Userdata for details where this is for each platform | |
import xbmc | |
xbmc.executebuiltin('xbmc.PlayMedia("/storage/videos/","isdir")') | |
xbmc.executebuiltin('xbmc.PlayerControl(repeatall)') | |
xbmc.executebuiltin("Action(Fullscreen)") |
SHIFT + F6
to refactor methods, classes, and variable namesCTRL + O
to override methodsCOMMAND + N
- Generate getter, setter, and constructor method for a class (when in editor pane)
- Generate new class, files, package, etc. (when in project pane)
CTRL+ALT+O
to auto-importOPTION + COMMAND + L
to reformat code
This file contains 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
# Please confirm that you want to reset the MySQL passwords | |
CONFIRM="n" | |
echo -n "Please confirm MySQL password reset. Continue? (y/N): " | |
read -n 1 CONFIRM_INPUT | |
if [ -n "$CONFIRM_INPUT" ]; then | |
CONFIRM=$CONFIRM_INPUT | |
fi | |
echo |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
package com.twilio; | |
import java.io.IOException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import com.twilio.sdk.verbs.Say; | |
import com.twilio.sdk.verbs.TwiMLResponse; |
OlderNewer