Skip to content

Instantly share code, notes, and snippets.

@jpotts18
jpotts18 / conrollers.js
Created April 5, 2013 18:31
Angular Demo
function PhoneListCtrl($scope) {
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi",
"snippet": "The Next, Next Generation tablet."},
{"name": "MOTOROLA XOOM™",
"snippet": "The Next, Next Generation tablet."}
];
}
//
// GPInputValidator.h
// GrowingPains
//
// Created by Kyle Clegg on 11/20/12.
// Copyright (c) 2012 Kyle Clegg. All rights reserved.
//
#import <Foundation/Foundation.h>
package com.parachuteapp.android.helpers;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Log;
import android.view.LayoutInflater;
$http({
url: user.details_path,
method: "GET",
params: {user_id: user.id}
});
# This is used to override what happens after login
class RegistrationsController < Devise::RegistrationsController
protected
def after_sign_up_path_for(resource)
@profile = Profile.create(:user_id => resource.id)
edit_profile_path(@profile)
end
end
@jpotts18
jpotts18 / Bathroom.java
Last active December 17, 2015 20:29
Inheritance, abstract, interface
public class Bathroom extends Room implements Flushable{
// inherited attr
// length
// width
public double bathtub = 0.5;
public boolean hasShower;
@Override
@jpotts18
jpotts18 / ios-deploy-to-testflight
Created June 28, 2013 19:29
Shell script to deploy automatically to testflight
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"
#LOG="/tmp/testflight.log"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/outer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="20dp">
<ImageView
android:id="@+id/poster"
android:layout_height="90dp"
package com.mydietitian.android.activities;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.client.Response;
import retrofit.http.GET;
package com.mydietitian.android;
import com.mydietitian.android.models.*;
import retrofit.Callback;
import retrofit.client.Response;
import retrofit.http.*;
/**
* User: jpotts
* Date: 8/23/13