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
| function svn_del | |
| { | |
| svn status | grep '\!' | awk '{print $2;}' | xargs svn rm; | |
| } |
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
| // the old way | |
| #pragma mark - | |
| #pragma mark Section Name | |
| // the new way | |
| #pragma mark - Section Name |
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
| function pg_restart | |
| { | |
| echo "Restarting PostgreSQL server..." | |
| sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl -wD /Library/PostgreSQL/9.0/data restart" | |
| } | |
| function pg_start | |
| { | |
| echo "Starting PostgreSQL server..." | |
| sudo su postgres -c "/Library/PostgreSQL/9.0/bin/pg_ctl -wD /Library/PostgreSQL/9.0/data start" |
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
| # Load the rails application | |
| require File.expand_path('../application', __FILE__) | |
| require 'active_record/connection_adapters/mysql2_adapter' | |
| require 'active_record/connection_adapters/postgresql_adapter' | |
| ActiveRecord::ConnectionAdapters::Mysql2Adapter::NATIVE_DATABASE_TYPES[:big_primary_key] = "BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY".freeze | |
| ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:big_primary_key] = "bigserial primary key".freeze | |
| # Initialize the rails application |
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
| /** | |
| * Load the default decorators for forms. | |
| * | |
| * @return Typeoneerror_Form Reference to form instance | |
| */ | |
| public function loadDefaultDecorators() | |
| { | |
| // wipe all | |
| $this->clearDecorators(); |
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
| /** Types of packets sent by session. */ | |
| typedef enum { | |
| PacketTypeStart, /**> packet to notify games to start. */ | |
| PacketTypeRequestSetup, /**> server wants client info. */ | |
| PacketTypeSetup, /**> send client info to server. */ | |
| PacketTypeSetupComplete, /**> round trip made for completion. */ | |
| PacketTypeTurn, /**> packet to notify game that a turn is up. */ | |
| PacketTypeRoll, /**> packet to send roll to players. */ | |
| PacketTypeEnd, /**> packet to end game. */ | |
| PacketTypeHeartbeat, /**> packet to attempt to keep peers alive. */ |
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
| - (void)doTheThing | |
| { | |
| if (TRUE) | |
| [self doSomething]; | |
| else | |
| [self doSomethingElse]; | |
| NSLog(@"will always run, but looks like part of else"); | |
| } |
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
| /* | |
| * Copyright (c) 2011 Typeoneerror Studios LLC | |
| * $Id$ | |
| */ | |
| package com.typeoneerror.apps.application.tasks; | |
| import android.util.Log; | |
| import com.typeoneerror.apps.application.io.ActivityFeedHandler; | |
| import com.typeoneerror.apps.application.model.Model; |
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
| private View buildIndicator(int imageResource, int stringResource) | |
| { | |
| final Button indicator = (Button)getLayoutInflater().inflate(R.layout.navigation_item, getTabWidget(), false); | |
| indicator.setCompoundDrawables(null, resources.getDrawable(imageResource), null, null); // LTRB | |
| indicator.setText(resources.getString(stringResource)); | |
| return indicator; | |
| } |
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
| //die(); | |
| require_once "../setup.php"; | |
| require_once "bootstrap.php"; | |
| require_once "apps.php"; | |
| foreach ($apps as $name => $env) | |
| { | |
| $clientId = $env[0]; | |
| $appSecret = $env[1]; |