Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/usr/bin/env bash | |
# Checks out to headless state of a remote branch and syncs | |
# Usage: `git review some-branch-name` | |
red='\033[31m' | |
green='\033[32m' | |
NC='\033[0m' # No Color | |
echo -e "${green}Stashing current changes...${NC}"; |
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#include <stdio.h> | |
typedef struct ll { | |
int value; | |
struct ll *next; | |
} ll; | |
void print_list(ll *list_head) | |
{ |
@SuppressWarnings({ "unchecked", "rawtypes" }) | |
private static <T> Pair<String, T> saveAndParseResponse(final ResponseBody response, final TypeReference type) | |
throws IOException { | |
final Buffer sink = new Buffer(); | |
final StringBuilder builder = new StringBuilder(); | |
final Charset charset = responseCharset(response); | |
response.source().readAll(new ForwardingSink(sink) { |
package com.ryanharter.android.util; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
/** | |
* Keeps track of the number of app launches, and days since first launch, and | |
* provides an easy way to determine whether you should show a rating prompt | |
* or not. | |
*/ |
<!doctype html> | |
<html> | |
<head> | |
<!-- Web Component Polyfill for old browsers --> | |
<script src="https://www.polymer-project.org/platform.js"></script> | |
<!-- Release candidate of next React --> | |
<script src="http://fb.me/react-with-addons-0.12.0-rc1.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.12.0-rc1.js"></script> | |
<!-- Import a web component --> |
public class ThingsAdapter extends RecyclerView.Adapter<ThingsAdapter.ViewHolder> { | |
private ParseQueryAdapter<ParseObject> parseAdapter; | |
private ViewGroup parseParent; | |
private ThingsAdapter thingsAdapter = this; | |
public ThingsAdapter(Context context, ViewGroup parentIn) { | |
parseParent = parentIn; |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="red_50">#fde0dc</color> | |
<color name="red_100">#f9bdbb</color> | |
<color name="red_200">#f69988</color> | |
<color name="red_300">#f36c60</color> | |
<color name="red_400">#e84e40</color> | |
<color name="red_500">#e51c23</color> | |
<color name="red_600">#dd191d</color> | |
<color name="red_700">#d01716</color> |
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request | |
navigationType:(UIWebViewNavigationType)navigationType { | |
NSString *urlString = [[request URL] absoluteString]; | |
if ([urlString hasPrefix:@"js:"]) { | |
NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject] | |
stringByReplacingPercentEscapes]; | |
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; | |
NSError *error; |