Skip to content

Instantly share code, notes, and snippets.

@rogerhu
rogerhu / gist:1165617
Created August 23, 2011 16:02 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job:
Favorite Python project: Django!
Favorite Conference: PyCodeConf. :)
Python Experience Level: Yields, decorators, and fixing GitHub/Python issues with Hudson/Jenkins CI server (http://hustoknow.blogspot.com)
@rogerhu
rogerhu / kinesis-remap
Created June 8, 2014 06:17
Kinesis KeyRemap
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>KINESIS</vendorname>
<vendorid>0x0518</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>ADVANTAGE</productname>
<productid>0x0001</productid>
</deviceproductdef>
@rogerhu
rogerhu / emacs_keyremap
Created June 8, 2014 07:58
Emacs page up page down
<?xml version="1.0"?>
<root>
<symbol_map type="KeyCode" name="PAGE_UP" value="0x74" />
<symbol_map type="KeyCode" name="PAGE_DOWN" value="0x79" />
<windownamedef>
<name>emacs_terminal</name>
<regex>emacs</regex>
</windownamedef>
<?xml version="1.0"?>
<root>
<symbol_map type="KeyCode" name="PAGE_UP" value="0x74" />
<symbol_map type="KeyCode" name="PAGE_DOWN" value="0x79" />
<windownamedef>
<name>emacs_terminal</name>
<regex>emacs</regex>
</windownamedef>
<?xml version="1.0"?>
<root>
<item>
<identifier>emacs_pageup_pagedown_{{ PRODUCT}}</identifier>
<name>Emacs pageup/pagedown</name>
<windowname_only>emacs_terminal</windowname_only>
<device_only>{{ PRODUCT }}, {{ KEY }} </device_only>
<autogen>__KeyToKey__ KeyCode::PAGE_UP, KeyCode::V, ModifierFlag::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::PAGE_DOWN, KeyCode::V, ModifierFlag::CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::CONTROL_L</autogen>
@rogerhu
rogerhu / purge.sh
Last active September 16, 2015 18:38
Updated Vagrant purge.sh script for Ubuntu 14.10
#!/bin/sh
# Revised for Ubuntu 14.10.
# Credits to:
# - https://gist.githubusercontent.com/adrienbrault/3775253/raw/da59136ef0414af151b917bd25a06882f0107947/purge.sh
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant
import os
import glob
import re
cur_dir = os.getcwd()
source_dir = "%s/projects/material-design-icons/navigation" % os.environ['HOME']
base_dest_dir = "%s/projects/my-android-project/app/src/main/res" % os.environ['HOME']
template = "drawable-%(density)s/ic_%(name)s_%(color)s_%(size)s.png"
@rogerhu
rogerhu / private.xml
Last active August 29, 2015 14:25
~/Library/Application Support/Karabiner/private.xml
<?xml version="1.0"?>
<root>
<symbol_map type="KeyCode" name="PAGE_UP" value="0x74" />
<symbol_map type="KeyCode" name="PAGE_DOWN" value="0x79" />
<windownamedef>
<name>emacs_terminal</name>
<regex>emacs</regex>
</windownamedef>
@rogerhu
rogerhu / core.xml
Last active August 29, 2015 14:25
core.xml
<?xml version="1.0"?>
<root>
<item>
<identifier>emacs_pageup_pagedown</identifier>
<name>Emacs pageup/pagedown</name>
<windowname_only>emacs_terminal</windowname_only>
<device_only>{{ PRODUCT }} </device_only>
<autogen>__KeyToKey__ KeyCode::PAGE_UP, KeyCode::V, ModifierFlag::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::PAGE_DOWN, KeyCode::V, ModifierFlag::CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::CONTROL_L</autogen>
In this video, I'm going to walk through a basic but functional ToDo list app.
- Going to rely on the Android Quickstart guide.
- The first step in building an app is scoping and wireframing it.
- Before you build anything, it's important to scope your app.
- We're going to define 3 different user scenarios: user can open the app and view a list, add a new item, and remove an item.
- First version we're not going to have marking completion or setting priority.
- Let's mock out our app to build the simplest wireframe for our app.
- It's important to think about the views and the interactions.
- It comes down to the Action Bar, the list of items vertically scrollable and click to remove,
textbox, and add button which will cause the input to be added to the list.