This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ContextSpecificObjectArray < Array | |
| def initialize(objects) | |
| super | |
| end | |
| def test | |
| raise self.to_yaml | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Gowie's .emacs file ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Directory for my installed packages | |
| (add-to-list 'load-path "~/.emacs.d/") | |
| ;; Not sure why I have to add these to the path? | |
| (add-to-list 'load-path "~/.emacs.d/scala") | |
| (add-to-list 'load-path "~/.emacs.d/coffee-mode") | |
| ;; (add-to-list 'load-path "~/.emacs.d/ensime/elisp/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Intent mPoiDetailIntent = new Intent(PoiListActivity.this, PoiDetailActivity.class); | |
| mPoiDetailIntent.putExtra("POINT_OF_INTEREST", poiClicked); | |
| startActivity(mPoiDetailIntent); | |
| // Then in the activtity that is recieving, so the PoiDetailActivity.class: | |
| Bundle b = getIntent().getExtras(); | |
| if(b != null){ // Activity started from PoiListActivity | |
| mPointOfInterest = (PointOfInterest) b.getSerializable("POINT_OF_INTEREST"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setContentView(R.layout.list); | |
| final ListView installationListView = getListView(); | |
| LayoutInflater inflater = getLayoutInflater(); | |
| ViewGroup header = (ViewGroup) inflater.inflate(R.layout.header, installationListView, false); | |
| TextView headerText = (TextView) header.findViewById(R.id.header_text); | |
| headerText.setText("Installations On Live"); // TODO: This should not be hardcoded | |
| installationListView.addHeaderView(header, null, false); | |
| setListAdapter(new ArrayAdapter<Installation>(InstallationListActivity.this, android.R.layout.simple_list_item_1, installations)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| init = -> | |
| console.log "onload called!" | |
| document.addEventListener("devicereadyisstupid", onDeviceReady(), false) | |
| onDeviceReady = () -> | |
| isPhoneGapReady = true | |
| console.log("DEVICEREADY!") | |
| window.onload = init() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HttpClient client = new DefaultHttpClient(); | |
| HttpURLConnection.setFollowRedirects(false); | |
| HttpURLConnection connection = (HttpURLConnection) new URL(serverDirectoryUrl).openConnection(); | |
| connection.setIfModifiedSince(ifModifiedBeforeDate.getTime()); | |
| int byteArraySize = connection.getContentLength(); | |
| Log.d(TAG, "Byte Array Size: " + byteArraySize); | |
| byte[] response = new byte[byteArraySize]; | |
| InputStream connectionInputStream = connection.getInputStream(); | |
| int bytesRead = connectionInputStream.read(response); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tapwalk.android.DataManagement; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: Matt Gowie | |
| * Date: 6/20/12 | |
| * Time: 3:08 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // map-and-markers.js | |
| // By: Matt Gowie | |
| // If you're checking this out and you have any comments or suggestions on how | |
| // this code could be improved, send me over an email at gowie.matt@gmail.com | |
| // Thanks! | |
| /////////////////////////////////////////////////////////////////////////////// | |
| $(function() { | |
| $('img.marker').hide(); // hide these till ready | |
| var $map = $('#map'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def show | |
| if @app_navigation == "TabBar" | |
| first_screen = TapwalkLink.new(@app_config.menu_items[0]) | |
| redirect_to url_for(:controller => first_screen.controller, first_screen.link_params) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is in my .bash_aliases: | |
| alias flw="source ~/Programs/flw.sh" | |
| # ~/Programs/flw.sh | |
| #!/bin/bash | |
| # Follow Script written by Matt Gowie | |
| if [[ $2 && ${2-x} && $3 && ${3-x} ]]; then |
OlderNewer