Skip to content

Instantly share code, notes, and snippets.

View ajpinedam's full-sized avatar

Andres Pineda ajpinedam

View GitHub Profile
@NVentimiglia
NVentimiglia / ItemStack.cs
Last active October 31, 2021 21:06
Need a Items control or a repeater for Xamarin ? Here you go. Bind to observable collections, define your data template and enjoy.
// MIT License
// Nicholas Ventimiglia
// 2016-9-19
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
@mlhamel
mlhamel / gist:83c28fa90afcbe96b673
Last active August 29, 2015 14:21
Montreal-Python + pythondotorg: interesting tickets
Pythondotorg at Montreal-Python Project Night
=============================================
The idea is to work on a Django project and to help the Python community by
making the Python website better.
For Installation instructions, please have a look at the following document:
http://htmlpreview.github.io/?https://github.com/mtlpy/pythondotorgdocs/blob/master/build/html/index.html
@benvium
benvium / apk-change-version-number.md
Created February 20, 2015 16:14
How to change the version number on an existing APK without re-building

This requires the latest version of apktool.

apktool d $APK_PATH -o $OUTPUT_FOLDER

# Open the apktool.yml text file
# Alter the versionCode and versionName entries

# now rebuild!
apktool build $OUTPUT_FOLDER 
@blounty
blounty / Android-CustomMapRenderer.cs
Created February 17, 2015 04:59
Create mapping apps that have amazingly cool custom map tiles with Xamarin.Forms
using System;
using Xamarin.Forms.Maps.Android;
using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Xamarin.Forms;
using CustomMapTiles;
using CustomMapTiles.Droid.Renderers;
[assembly: ExportRenderer (typeof (CustomMap), typeof (CustomMapRenderer))]
namespace CustomMapTiles.Droid.Renderers
var expect = require("chai").expect;
var cakes = function(recipe, ingredients) {
var result = Math.floor(Object.keys(recipe).map(function(ingredient) {
return ingredients[ingredient] / recipe[ingredient];
}).sort(function(a,b) {
return a - b;
})[0]);
return isNaN(result) ? 0 : result;
@EfrainReyes
EfrainReyes / FizzBuzz.cs
Created November 28, 2014 13:42
Fizz Buzz using functional C#
Enumerable.Range(1, 30).Select(num =>
((Func<string[], string>)
(buzz => new string[]{
buzz[((num + 2) % 3) / 2] +
buzz[((num + 4) % 5) / 4 * 2],
""+num
}.First(r => r != "")))(new[] { null, "fizz", "buzz"})
).ToList().ForEach(s => Console.WriteLine(s));
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading;
namespace WpfApplication1
{
public class AsyncObservableCollection<T> : ObservableCollection<T>
{
private readonly SynchronizationContext _synchronizationContext = SynchronizationContext.Current;
class Player
def initialize()
@health = 21
@forward = :forward
@backward = :backward
@direction = @forward
end
def play_turn(warrior)
spaces = warrior.look(:forward)
@jadeatucker
jadeatucker / HOWTODMG.md
Last active September 28, 2025 07:21
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@jfoshee
jfoshee / ListPickerViewModel.cs
Created March 22, 2013 19:20
Implementation of MonoTouch (Xamarin.iOS) UIPickerViewModel for an IList<T>.
namespace Unplugged
{
public abstract class ListPickerViewModel<TItem> : UIPickerViewModel
{
public TItem SelectedItem { get; private set; }
IList<TItem> _items;
public IList<TItem> Items
{
get { return _items; }