Skip to content

Instantly share code, notes, and snippets.

View dalexsoto's full-sized avatar

Alex Soto dalexsoto

View GitHub Profile
-> CopyPNGFile
Copies a .png file resource, optionally compressing it.
$ copypng [options] $(IPHONE_OPTIMIZE_OPTIONS) [input] [output]
-> Code Sign
Code-sign a framework, application, or other built target.
$ /usr/bin/codesign
-> Strip Symbols
Remove or modify the symbol table of a Mach-O binary
using System;
using System.Net.Http;
namespace IsItRdyYet
{
class MainClass
{
public static void Main (string[] args)
{
var http = new HttpClient ();
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Testing.Xamarin.Android.Support</id>
<version>20.0.0-alpha1</version>
<title>Android Support Library (Testing)</title>
<authors>Matthew Leibowitz</authors>
<licenseUrl>http://components.xamarin.com/license/xamandroidsupportv4-18</licenseUrl>
<projectUrl>http://components.xamarin.com/view/xamandroidsupportv4-18</projectUrl>
<iconUrl>http://components.xamarin.com/resources/icons/component-824/icon_114x114.png</iconUrl>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{179AD7DF-4343-4F6E-9875-C38469F3787E}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
NSUrl url = new NSUrl (UPLOAD_LOCATION);
NSMutableUrlRequest request = new NSMutableUrlRequest (url);
request.HttpMethod = "POST";
{
// Unfortunately set_HTTPBodyStream isn't implemented in monotouch yet
Selector s = new Selector("setHTTPBodyStream:");
NSInputStream stream = new NSInputStream (random_file_path);
Messaging.void_objc_msgSend_IntPtr (request.Handle, s.Handle, stream.Handle);
using System;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.AudioToolbox;
using MonoTouch.CoreGraphics;
namespace GoogleMusic
{
public class LevelMeter : UIView
{
@nicwise
nicwise / gist:1319168
Created October 27, 2011 09:35
Scroll view stuff
float pageControlHeight = 18.0f;
UIScrollView scrollView;
UIPageControl pageControl;
public void BuildAndReloadUI(List<Marker> markers, int favCount)
{
Util.TurnOffNetworkActivity();
CleanView();
@dalexsoto
dalexsoto / ObjectiveCParser.cs
Created November 8, 2011 15:42 — forked from kevinmcmahon/ObjectiveCParser.cs
An Objective C brute force parser from #monotouch irc
// no claim or warranty is made on this code
// it is very brute force
using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
//most of the non-declared variables here are at the class level - eg window is:
// UIWindow window
// etc.
window = new UIWindow (UIScreen.MainScreen.Bounds);
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque;
public class BTPinchGestureRecognizer : UIPinchGestureRecognizer
{
public BTPinchGestureRecognizer(NSObject target, Selector action) : base(target, action)
{
ShouldReceiveTouch += (sender, touch) => {
//if (touch.View is UISlider || touch.View is MPVolumeView) return false;
return true;
};