Skip to content

Instantly share code, notes, and snippets.

View croach's full-sized avatar

Christopher Roach croach

View GitHub Profile
@croach
croach / nenv.sh
Created March 16, 2014 02:09
A set of bash/zsh functions that provide simple virtual environment capabilities for node.
#
# A set of bash/zsh functions that provide simple virtual environment
# capabilities for node. To install, just copy this file into your home
# directory and add the following to your .bashrc or .zshrc file:
#
# if [[ -f "$HOME/.nenv" ]]; then
# source "$HOME/.nenv"
# fi
#
# What this script provides is a set of functions that are activated whenever
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
LinearLayout main = new LinearLayout(this);
main.setOrientation(LinearLayout.VERTICAL);
setContentView(main);
}
package com.android.hello;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.widget.EditText;
import android.view.View;
import android.view.View.OnClickListener;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
final EditText editText = new EditText(this);
editText.setWidth(240);
final TextView textView = new TextView(this);
Button button = new Button(this);
button.setText("Click Me");
button.setOnClickListener(new Button.OnClickListener() {
#### `.gitattributes`
*.pbxproj -crlf -diff -merge
function fib(n)
if n <= 1 then
return n
else
return fib(n-1) + fib(n-2)
end
end
for i=0, 35 do print("n = "..i.." => "..fib(i)) end
# Check for the .bashrc file and execute it if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Adding Google's Android SDK
export PATH=$PATH:/your/chosen/path/android-sdk-mac_x86-0.9_beta/tools
% source ~/.bashrc
activitycreator -o HelloAndroid com.android.hello.HelloAndroid
cd HelloAndroid
emulator &
# Make sure that you wait until you see the actual
# operating system (i.e., the main “desktop”) before
# you execute the next line, otherwise you’ll be
# stuck with some type of error stating that the
# install wasn’t successful.
ant install