Skip to content

Instantly share code, notes, and snippets.

View mattapperson's full-sized avatar
🏠
Working from home

Matt Apperson mattapperson

🏠
Working from home
View GitHub Profile
<Alloy>
<Window class="container" id="editWindow">
<View layout="vertical">
<!-- Reuse same fields from addbook (ex: Require type="view" src="rss" id="rssTab") -->
<Label class="label">Title:</Label>
<TextField id="titleInput" hintText="Title..."/>
<Label class="label">Author:</Label>
<TextField id="authorInput" hintText="Author..."/>
<Button id="cancelButton" title="Cancel" onClick="cancelUpdate"/>
<Button id="saveButton" title="Save" onClick="updateBook"/>
@mattapperson
mattapperson / Shell step 1
Created May 11, 2014 20:22
Jenkins iOS for Titanium mobile
cd ~/Desktop/ticonf2014testappdemo/alloytest
titanium clean
titanium build --platform=iphone --test &
sleep 30
killall "iPhone Simulator"
export PATH="/Users/andrewmcelroy/.rbenv/shims:/Applications/Postgres.app/Contents/MacOS/bin:/Users/andrewmcelroy/bin:/usr/local/bin:/Users/andrewmcelroy/.rbenv/bin:/Users/andrewmcelroy/android/tools:/Users/andrewmcelroy/android/:/Users/andrewmcelroy/android//tools:/Users/andrewmcelroy/android/platform-tools/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/andrewmcelroy/.ec2/bin"
echo | titanium calabash --platform=iphone
@mattapperson
mattapperson / app.js
Last active August 29, 2015 13:57 — forked from kwhinnery/app.js
var client = require('twilio')();
// Callback
client.listMessages({
to:'+16516668899'
}, function(err, data, next) {
if (err) {
console.error(err);
} else if (!next()) {
console.log('no more records for query');
{
"name": "test",
"version": "0.0.0",
"description": "ERROR: No README.md file found!",
"main": "index.js", // How do I run this without knowing the main filename?
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": "",
"author": "",

Debugging & Profiling Node.js

This is a maintained listing of all the different ways to debug and profile Node.js applications. If there is something missing or an improvement, post a comment! :)

Interactive Stack Traces with traceGL - Shareware

  1. Guide here
var test = require('com.test');
...
var testTwo = test.init();
var realView = testTwo.createView();
// Here we have 2 examples of perposed TiKit syntax
// Example 1 (a basic window):
var TiKit = require('com.tikit');
var win = new TiKit.Window({
backgroundColor: 'red'
});
win.open();
var win = new Window({
backgroundColor: '#fff'
});
var box = new View({
width:40,
height:40,
backgroundColor: '#000'
});
PS1="\h:\[\e[0;32m\]\w\[\e[m\] "
####################################################################
# Add the current Git branch
####################################################################
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\033[00m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\$(parse_git_branch) \[\033[00m\]$\[\033[00m\] "
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat