Skip to content

Instantly share code, notes, and snippets.

View vackup's full-sized avatar

Hernan Zaldivar vackup

View GitHub Profile
@vackup
vackup / Radar
Created November 30, 2013 05:48
Unity3d Radar script I was looking for a way to make a radar or minimap in Unity3d but not adding other camara, just a square and some dots inside representing my game objects. I found someone who needed the same as I (http://answers.unity3d.com/questions/62018/how-to-make-a-radarmap.html). I took the Justin's Zaun radar script from the Unity wi…
//
// Radar - Based off of the other radar scripts I've seen on the wiki
// By: Justin Zaun
//
// Attach this wherever you like, I recommend you attach it where the rest of your GUI is. Once
// attached take a look at the inspector for the object. You are going to see a bunch of options
// to setup. I've tried to give a set of defaults that will work with little messing around.
//
// The first item that should be set is the "Radar Center Tag" for anything of interesting to
// happen. This tag should be the object at the center of the radar, typically this is the local
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace ODataMobile

SVG Animated Guitar (Play Me!)

Rock out with this interactive svg animation, click, tap, or any key to play! Part of my Pen's of Rock! collection. Drawn in adobe illustrator, animated with greensock's svg morph plugin. Turn your speakers up for html audio elements in your ears! Took a lot of inspiration from @chrisgannon for animation. Just to be clear - I recorded the guitar, however I didn't write "Smoke on the Water"... Weird bounding box appears when tapped on mobile, any ideas?

Forked from Josh's Pen SVG Animated Guitar (Play Me!).

A Pen by Hernan Zaldivar on CodePen.

License.

@vackup
vackup / Creating Shazam in Java
Created September 13, 2016 01:24 — forked from mort/Creating Shazam in Java
Creating Shazam in Java
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
@vackup
vackup / Animation Fade
Created September 20, 2016 02:43 — 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;
@vackup
vackup / TextMeter.cs
Created September 22, 2016 14:15 — forked from rudyryk/TextMeter.cs
C# — Measure string size in Xamarin.Forms for iOS and Android platforms
//
// TextMeter.cs
// Created by Alexey Kinev on 11 Feb 2015.
//
// Licensed under The MIT License (MIT)
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2015 Alexey Kinev <alexey.rudy@gmail.com>
//
// Usage example:
@vackup
vackup / CustomUIBarButtonItem.cs
Created September 22, 2016 14:15 — forked from pierceboggan/CustomUIBarButtonItem.cs
Shows off using a UIButton with a background image as a UIBarButtonItem, and handling touch events accordingly.
var composeButton = new UIButton (new RectangleF (0, 0, 20, 20));
composeButton.SetBackgroundImage (Images.ComposeButton, UIControlState.Normal);
composeButton.SetBackgroundImage (Images.ComposeButtonHighlighted, UIControlState.Highlighted);
composeButton.AddTarget((object sender, EventArgs args) => PresentViewController (new PrayerComposeDialog (), true, null),
UIControlEvent.TouchUpInside);
ComposeButton = new UIBarButtonItem (composeButton);
NavigationItem.RightBarButtonItem = ComposeButton;
public abstract class ViewModelBase : MvxViewModel
{
protected void ClearStackAndShowViewModel<TViewModel>()
where TViewModel : ViewModelBase
{
var presentationBundle = new MvxBundle(new Dictionary<string, string> { { PresentationBundleFlagKeys.ClearStack, "" } });
ShowViewModel<TViewModel>(presentationBundle: presentationBundle);
}
}
// an abstract helper class
public abstract class MvxAnnotationManager
{
private readonly MKMapView _mapView;
private IEnumerable _itemsSource;
private IDisposable _subscription;
public Dictionary<object, MKAnnotation> _annotations = new Dictionary<object, MKAnnotation>();
protected MvxAnnotationManager(MKMapView mapView)
{