Skip to content

Instantly share code, notes, and snippets.

View LivioGama's full-sized avatar

Livio Gamassia LivioGama

View GitHub Profile
@turtlesoupy
turtlesoupy / SFSConfettiScreen.m
Created September 16, 2012 09:11
Confetti particle system for iOS5+
//
// Created by tdimson on 8/15/12.
#import <QuartzCore/QuartzCore.h>
#import "SFSConfettiScreen.h"
@implementation SFSConfettiScreen {
__weak CAEmitterLayer *_confettiEmitter;
CGFloat _decayAmount;
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@samnm
samnm / ABSpringDemoViewController.m
Created April 20, 2014 03:03
A super-quick clone of Facebook Paper's springy table view
//
// ABSpringDemoViewController.m
// Springy
//
#import "ABSpringDemoViewController.h"
@interface ABSpringDemoViewController () <UITableViewDataSource, UITableViewDelegate> {
UITableView *_tableView;
CADisplayLink *_displayLink;
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@mjurkus
mjurkus / AbstractCameraFragment
Created April 27, 2015 11:15
Abstract camera fragment implementation using focus modes
public abstract class AbstractCameraFragment extends MDFragment implements UnexpectedTerminationHelper.OnCrashListener, SurfaceHolder.Callback, Camera.AutoFocusCallback {
protected Camera camera;
private boolean previewRunning, cameraReleased, focusAreaSupported, meteringAreaSupported;
private UnexpectedTerminationHelper terminationHelper;
private int focusAreaSize;
private FocusSound focusSound;
private Matrix matrix;
protected ResultListener resultListener;
@lopspower
lopspower / README.md
Last active January 20, 2024 09:18
Publish AAR to jCenter and Maven Central

Publish AAR to jCenter and Maven Central

Twitter

EDIT: You can find this same updated tutorial here -> Medium

Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:

  1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: CircularImageView
@celian-m
celian-m / CMBanner.md
Last active February 24, 2016 17:02
Banner

#Add a top-right banner to your view Added Banner ##Usage

 let banner = CMBannerView(frame: CGRectMake(0, 0, 120, 120), text: "New", color: UIColor.redColor(), width: 30)
 myView.addSubview(banner)

##Implementation

@bdw
bdw / geojson-to-postgis.py
Created April 12, 2016 10:03
geojson to postgis
#!/usr/bin/env python
from __future__ import print_function, unicode_literals
import operator
import psycopg2
import psycopg2.extras
import io
import json
import sys
import logging
import UIKit
open class LayerView<Layer: CALayer>: UIView {
public final override class var layerClass: Swift.AnyClass {
return Layer.self
}
public final var concreteLayer: Layer {
return layer as! Layer
}
@nickbutcher
nickbutcher / MainActivity.kt
Last active February 22, 2024 21:17
Demonstrating how to tile a (Vector) Drawable
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY