Skip to content

Instantly share code, notes, and snippets.

@mps
mps / InfoPlist.strings
Created May 23, 2013 14:35
Gitty Translation File
/* Localized versions of Info.plist keys */
"Credits" = "Credits";
"Here are some great libraries I used to create this application:" = "Here are some great libraries I used to create this application:";
"About" = "About";
"Thank You" = "Thank You";
"Thank you to the amazing team at GitHub for creating a great product, without their hard work, none of this would have been possible." = "Thank you to the amazing team at GitHub for creating a great product, without their hard work, none of this would have been possible.";
"About the Developer" = "About the Developer";
"Icon Design" = "Icon Design";
@mps
mps / gist:5576596
Created May 14, 2013 15:00
Gitty description
We think Gitty is the best way to use GitHub for iOS. Here are some features users can expect:
News Feeds and Notifications
• Stay up to date with the latest events for repositories you star and contribute to as well as all of your organizations' activities. Gitty makes looking at these events beautiful and easy to follow.
• Gitty allows you to easy see and read GitHub notifications with the deep linking you have come to expect.
Repositories, Users and Organizations
• Easily access your private and public repositories' code and issues.
@mps
mps / gist:5415670
Last active December 16, 2015 09:49
NSMutableDictionary* attributes = [[NSMutableDictionary alloc]init];
// p
UIFont *paragraphFont = [UIFont fontWithName:@"Helvetica" size:12.0];
NSMutableParagraphStyle* pParagraphStyle = [[NSMutableParagraphStyle alloc]init];
pParagraphStyle.paragraphSpacing = 12;
pParagraphStyle.paragraphSpacingBefore = 12;
NSDictionary *pAttributes = @{ NSFontAttributeName : paragraphFont, NSParagraphStyleAttributeName : pParagraphStyle };
@mps
mps / gist:3691140
Created September 10, 2012 14:14
EDD Content
This method also appends a Checkout Box to whatever the user entered in for a Download's content.
<?php the_content('Read the rest of this entry &raquo;'); ?>
Is there a way to not have the Checkout Box appended?
@mps
mps / deploying.md
Created June 21, 2012 14:54
Free WordPress Hosting on Heroku

Deploy to Heroku

$ git push heroku production:master
> -----> Heroku receiving push
> -----> PHP app detected
> -----> Bundling Apache v2.2.19
> -----> Bundling PHP v5.3.6
> -----> Discovering process types

> Procfile declares types -> (none)

@mps
mps / functions.php
Created June 19, 2012 19:46
Hide the WordPress admin bar in two lines of code
add_filter( 'show_admin_bar', '__return_false' );
@mps
mps / gist:2890181
Created June 7, 2012 17:24
Mono for Android Shared Preferences
// Store Preferences
SharedPreferences pref = context.getSharedPreferences("MY_PREFERENCE", MODE_PRIVATE);
Editor editor = pref.edit();
editor.clear();
editor.putString("my_stored_value", "some_value");
editor.commit();
@mps
mps / gist:2890074
Created June 7, 2012 17:03
Mono File Upload
public void UploadFile ()
{
var uri = new Uri ("http://my_file_upload_handler.com");
var client = new WebClient ();
client.UploadFileCompleted += UploadComplete;
client.UploadFileAsync(uri, "local_file.png");
}
public void UploadComplete (object sender, UploadFileCompletedEventArgs args)
{
@mps
mps / IR_Black.dvtcolortheme
Created August 16, 2011 20:56 — forked from osteslag/IR_Black.dvtcolortheme
IR_Black theme for Xcode 4, based on IR_Black for Xcode 3 by David Zhou, based on IR_Black for TextMate by Todd Werth. See links in comments below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.811765 0.796078 0.564706 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Inconsolata - 16.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@mps
mps / RateBreakdownWindowPresenterBase.cs
Created August 9, 2011 20:29
Proposed Upload change
protected virtual void OnUploadCommandExecute(object debugObj)
{
UploadDebug = debugObj == null ? false : debugObj.Equals("true");
var dateDiff = Policy.EffectiveDt.Subtract(DateTime.UtcNow);
if (dateDiff.Days > 30 || dateDiff.Days < 0)
{
AlertWindow.Alert("Cannot upload a policy unless the effective date is within 30 days of today.", "Invalid effective date");
return;
}