Skip to content

Instantly share code, notes, and snippets.

View cesarferreira's full-sized avatar

César Ferreira cesarferreira

View GitHub Profile
@cesarferreira
cesarferreira / BlinkAnimation.java
Created May 27, 2014 13:58
Make a View Blink for a desired duration (android)
// Animate a text view
TextView myText = (TextView) findViewById(R.id.textView1);
myText = (TextView)Utils.makeMeBlink(myText,250,20);
// Animate an image view
ImageView imageView = (ImageView) findViewById(R.id.imageView);
imageView = (ImageView)Utils.makeMeBlink(imageView,250,20);
@cesarferreira
cesarferreira / GitTips.md
Last active August 29, 2015 14:01
Git tips and tricks

Discard all changes since last commit

git clean -df & git checkout .

Set a new remote

git remote set-url origin git://new.url.here
@cesarferreira
cesarferreira / Blink.m
Created June 4, 2014 10:18
How to make a view blink on iOS
@cesarferreira
cesarferreira / weightsum.xml
Created June 6, 2014 16:51
Android WeightSum example
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:background="@color/DarkGoldenrod"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="2" />
@cesarferreira
cesarferreira / integrate_facebook_android_studio.md
Last active August 29, 2015 14:02
Integrate Facebook in Android Studio
git submodule add https://github.com/facebook/facebook-android-sdk.git

Add sdk as gradle project:

  • edit settings.gradle and add line:
include ':facebook-android-sdk:facebook'

Add sdk as dependency to module:

  • edit build.gradle and add within dependencies block:
@cesarferreira
cesarferreira / objctips.m
Last active August 29, 2015 14:04
Objective-C tips
//////////////////////////////////////////////
// Convert NSData* to NSString*
//////////////////////////////////////////////
[[NSString alloc] initWithData:JSON encoding:NSASCIIStringEncoding];
//////////////////////////////////////////////
// Passing variables threw segue's
//////////////////////////////////////////////
@cesarferreira
cesarferreira / CustomAdapter.java
Created August 23, 2014 00:14
A custom array adapter for Android, the right way
package com.gml.redcarpet.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.List;
/**
@cesarferreira
cesarferreira / .gitignore
Created August 27, 2014 17:06 — forked from kogakure/.gitignore
latex gitignore
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
FOR IMMEDIATE RELEASE

## AppName vX.X does something interesting

AppName vX.X is on the App Store now, and features the following very interesting feature. This is a summary, so I'm focusing on the lead. Just something to make me want to read the rest. Done.

City, State/Country - [Company/Developer] has released AppName vX.X, available in the Mac App Store. AppName is/does [broad, general strokes]. [A few more specific points about who it's for and why it's of benefit to them].

New features!
@interface myViewController: UIViewController <CLLocationManagerDelegate>
CLLocationManager *locationManager;
CLLocation *currentLocation;
@end