Skip to content

Instantly share code, notes, and snippets.

View jzeferino's full-sized avatar
:octocat:
󠀡

jzeferino jzeferino

:octocat:
󠀡
View GitHub Profile
@jzeferino
jzeferino / Zarcula.json
Last active March 14, 2016 14:27
Xamarin Studio Theme based on Darcula from Android Studio
{
"name":"Zarcula",
"version":"1.0",
"description":"Based on Darcula from Android Studio.",
"originator":"jzeferino",
"colors":[
{"name": "Background(Read Only)", "color":"#323232" },
{"name": "Search result background", "color":"#005F60" },
{"name": "Search result background (highlighted)", "color":"#007F80" },
{"name": "Fold Square", "color":"#74705E", "secondcolor":"#323232" },
@jzeferino
jzeferino / blocklist.txt
Created April 24, 2016 09:21 — forked from Cheesebaron/blocklist.txt
Blocklist for: https://chrome.google.com/webstore/detail/personal-blocklist-by-goo/nolijncfnkgaikbjbdaogikpmpbdcdef I hate stupid aggregators, which uses Stackoverflow QA etc. DIE DIE DIE!
28im.com
4byte.cn
acnenomor.com
adtandroid.blogspot.com
androidstackoverflow.blogspot.com
askmequest.gq
besttopics.net
bloglovin.com
c9q.net
codebaum.wordpress.com
@jzeferino
jzeferino / xamarinandroidbindings.md
Created June 13, 2016 09:06 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@jzeferino
jzeferino / PathUtils.cs
Last active June 15, 2016 14:34
A class that retrieve the path to a local resource (video/image/audio) in phone.
using System;
using Android.Content;
using Android.Database;
using Android.OS;
using Android.Provider;
using Java.Lang;
using Environment = Android.OS.Environment;
using String = System.String;
using Uri = Android.Net.Uri;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
@jzeferino
jzeferino / XamFormsImageResize
Created August 2, 2016 15:50
XamFormsImageResize
using System;
using System.IO;
#if __IOS__
using System.Drawing;
using UIKit;
using CoreGraphics;
#endif
#if __ANDROID__
@jzeferino
jzeferino / InvariantUrlParameterFormatter.cs
Last active August 27, 2016 09:31 — forked from ncruces/InvariantUrlParameterFormatter.cs
Culture invariant IUrlParameterFormatter for Refit
using System;
using System.Globalization;
using System.Reflection;
namespace Refit
{
public sealed class InvariantUrlParameterFormatter : IUrlParameterFormatter
{
public string Format(object parameterValue, ParameterInfo parameterInfo)
{
@jzeferino
jzeferino / LocalJsonLoader.cs
Created October 23, 2016 20:27
Load T from resources Xamarin - Note: mark file build action as embedresource
using System;
using System.IO;
using System.Reflection;
using Newtonsoft.Json;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
namespace jzeferino.gist
{
public static class LocalJsonLoader
<StyleCopSettings Version="4.3">
<GlobalSettings>
<CollectionProperty Name="DeprecatedWords">
<Value>preprocessor,pre-processor</Value>
<Value>shortlived,short-lived</Value>
</CollectionProperty>
</GlobalSettings>
<Parsers>
<Parser ParserId="StyleCop.CSharp.CsParser">
<ParserSettings>
@jzeferino
jzeferino / gist:6e8fe5660cdad6e62cf9e879028858d1
Created November 4, 2016 15:07 — forked from snikch/gist:3661188
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}