Skip to content

Instantly share code, notes, and snippets.

View martarodriguezm's full-sized avatar

Marta Rodriguez martarodriguezm

View GitHub Profile
@NikhilManapure
NikhilManapure / Gif.swift
Last active October 29, 2023 07:31
Create Gif from array of UIImages in Swift 3
import Foundation
import UIKit
import ImageIO
import MobileCoreServices
extension UIImage {
static func animatedGif(from images: [UIImage]) {
let fileProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: 0]] as CFDictionary
let frameProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [(kCGImagePropertyGIFDelayTime as String): 1.0]] as CFDictionary
@pescode
pescode / Android Icons.jsx
Last active May 5, 2024 07:01
Unity Icons Generator for Win Store, Android & iOS Photoshop Script
// Based on https://gist.github.com/appsbynight/3681050 by Matt Di Pasquale
// Author: Victor Corvalan
// http://twitter.com/pescadon
// This script will generate squares and wide Icons & Tiles required for Windows Store build on Unity3D
// Prepare 1 big icon of 512x512px
// Open this script with Photoshop -> File -> Scripts -> Browse
// Load your icon when prompted
var destFolder;
try
@aakashns
aakashns / apk_decompiler.py
Created January 19, 2016 17:42
Script to download and decompile an apk using just the package name.
import requests
from bs4 import BeautifulSoup
from subprocess import call
import sys
# Script to download and decompile an apk using the package name.
# Install the jadx decompiler before running this.
#
# JADX installation :
# $ git clone https://github.com/skylot/jadx.git

How to iOS

Dear iOS Developer,

These are the things you might take into account when developing rock-solid iOS apps.

Writing better code makes you happy and will make your employer, teammates, and even customers happier in the mid-long term.

Please remember

@lacek
lacek / update-jenkins.sh
Created August 23, 2015 14:36
Update Jenkins on Mac OS X
#!/bin/bash
DEFAULT_URL=http://updates.jenkins-ci.org/current/latest/jenkins.war
TMP_PATH=/tmp/jenkins.war
APP_PATH=/Applications/Jenkins/jenkins.war
PLIST_PATH=/Library/LaunchDaemons/org.jenkins-ci.plist
url=${1-$DEFAULT_URL}
echo 'Downloading WAR package...'
@berkkaraoglu
berkkaraoglu / BorderedCircleTransform.java
Created November 14, 2014 09:12
BorderedCircleTransform for Picasso (Based on https://gist.github.com/julianshen/5829333)
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
public class CircleTransform implements Transformation {
private final int BORDER_COLOR = Color.WHITE;
@ManuelPeinado
ManuelPeinado / MainActivity.java
Created October 19, 2014 20:02
Fading action bar effect using the new Toolbar class from the support library
package com.github.manuelpeinado.toolbartest;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;
@donnfelker
donnfelker / CircularTransformation.java
Last active December 2, 2020 20:47
Picasso and CircularTransform Example
import android.graphics.*;
import com.squareup.picasso.Transformation;
/**
* Transforms an image into a circle representation. Such as a avatar.
*/
public class CircularTransformation implements Transformation
{
int radius = 10;
@Nilzor
Nilzor / ScalingImageView.java
Last active May 17, 2018 11:22
An ImageView with modified onMeasure which scales bounding box even if ImageView has layout width/height match_parent / fill_parent
package nilzor.public.views;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.ImageView;
public class ScalingImageView extends ImageView {
private boolean mAdjustViewBounds;
#import <Foundation/Foundation.h>
@interface NSObject (NSDictionaryRepresentation)
/**
Returns an NSDictionary containing the properties of an object that are not nil.
*/
- (NSDictionary *)dictionaryRepresentation;
@end