Skip to content

Instantly share code, notes, and snippets.

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

jzeferino jzeferino

:octocat:
󠀡
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jzeferino on github.
  • I am jzeferino (https://keybase.io/jzeferino) on keybase.
  • I have a public key ASBFrrd2nlSZOM6wNSDvbgH7XtQyy1uR60KB9Fyb9kvTOAo

To claim this, I am signing this object:

@jzeferino
jzeferino / remove_bin_obj_packages_from_this_directory_recursively.sh
Created August 16, 2017 12:53
Removes bin, obj and packages from current folder recursively
#!/bin/bash
declare -a arr=("obj" "bin" "packages") # Remove/add folders you want to clean up.
read -p "Delete $(printf "%s, " "${arr[@]}")folders under $PWD? (y/n) " answer
case ${answer:0:1} in
y|Y )
for folder in "${arr[@]}"
do
echo "Cleaning $folder"
find . -name $folder -type d -exec rm -rf {} +
@jzeferino
jzeferino / ViewPagerViewController.cs
Created January 11, 2019 16:05
ViewPager like ViewController
using System;
using UIKit;
using System.Collections.Generic;
using Foundation;
using System.Linq;
namespace CustomView
{
public class ViewPagerViewController<TData> : UIPageViewController, IUIPageViewControllerDelegate, IUIPageViewControllerDataSource
{
@jzeferino
jzeferino / Animation Fade
Created October 11, 2018 16:04 — forked from aloisdeniel/Animation Fade
Xamarin.iOS view common animations
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null)
{
var minAlpha = (nfloat)0.0f;
var maxAlpha = (nfloat)1.0f;
view.Alpha = isIn ? minAlpha : maxAlpha;
view.Transform = CGAffineTransform.MakeIdentity ();
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut,
() => {
view.Alpha = isIn ? maxAlpha : minAlpha;
@jzeferino
jzeferino / PhotoService.cs
Last active February 28, 2018 22:14
Retrieves a random photo byte[]
// =============================================
// AUTHOR : jzeferino
// PURPOSE : A simple Xamarin introduction demo
// =============================================
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace SharedCode.Service
@jzeferino
jzeferino / SuffixEditText
Last active February 7, 2018 15:42
Edit text with suffix
using Android.Content;
using Android.Util;
using Android.Widget;
using Android.Runtime;
using System;
using Android.Text;
namespace Utils
{
public class SuffixEditText : EditText
@jzeferino
jzeferino / DrawerMenuCustomFontHack.java
Created November 5, 2016 13:00
Hack custom font in drawer menu with calligraphy
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@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 / Logger.cs
Created February 1, 2018 09:45 — forked from ankitvijay/Logger.cs
CallerInfoExample
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace CallerInfoExample
{
public static class Logger
{
public static void Log(string message,
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0,