Skip to content

Instantly share code, notes, and snippets.

View aimore's full-sized avatar
🏠
Working from home

Aimoré aimore

🏠
Working from home
View GitHub Profile
@aimore
aimore / strings.json
Last active June 30, 2019 07:14
XamFood Strings Json
{
"appName": "Joe's",
"isPremium": false,
"styles": {
"backgroundColor": "#fefcfa",
"promoTitleColor": "#1b1b1b",
"tabBarColor": "#fefcfa",
"categoryTitleColor": "#fefcfa",
"descriptionColor": "",
"rightWidgetColor": "",
@aimore
aimore / extension.cs
Created May 30, 2019 02:00
Image source extension xamarin
[ContentProperty(nameof(Source))]
public class ImageResourceExtension : IMarkupExtension
{
public string Source { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Source == null)
{
return null;
@aimore
aimore / SignatureCheck.cs
Last active September 28, 2018 04:47
Android signature security validation for Xamarin.Android
public bool ValidateAppSignature(Android.Content.Context context)
{
PackageInfo packageInfo = context.PackageManager.GetPackageInfo(context.PackageName, PackageInfoFlags.Signatures);
//note sample just checks the first signature
foreach (Signature signature in packageInfo.Signatures) {
// SHA1 the signature
String sha1 = GetSHA1(signature.ToByteArray());
// check is matches hardcoded value
return APP_SIGNATURE.Equals(sha1);
/*! Leaflet.Instagram 2014-06-26 */
L.Instagram = L.FeatureGroup.extend({
options: {
icon: {
iconSize: [40, 40],
className: "leaflet-marker-instagram"
},
popup: {
className: "leaflet-popup-instagram"
},
/*
Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
https://github.com/Leaflet/Leaflet.markercluster
(c) 2012-2013, Dave Leaver, smartrak
*/
! function(t, e) {
L.MarkerClusterGroup = L.FeatureGroup.extend({
options: {
maxClusterRadius: 80,
iconCreateFunction: null,
html, body, #map {
margin: 0; height: 100%; background: #fff;
}
Skip to content
This repository
Search
Pull requests
Issues
Marketplace
Explore
@aimore
Sign out
6
using System;
using UIKit;
using CoreGraphics;
using CoreAnimation;
namespace Coverflow
{
public class CoverFlowLayout : UICollectionViewFlowLayout
{
private const int ACTIVE_DISTANCE = 200;
@aimore
aimore / codecommuntiy.swift
Last active June 21, 2016 10:48
Swift basics ( 1 swift meetup)
//: Swift meetup 15:03.1026
import Cocoa
/*var int: Int=3
print(int)
var letter: [String] = ["a", "b", "c", "d", "e"]
@aimore
aimore / ViewController.swift
Created June 20, 2016 17:46
BullsEye game created with Swift
//
// ViewController.swift
// BullsEye
//
// Created by Aimoré Sá on 17.11.15.
// Copyright © 2015 Aimoré Sá. All rights reserved.
//
import UIKit