This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ANDROID_SDK_VERSION=24.0.0 | |
export ANDROID_HOME=~/Library/Android/sdk/ | |
export ANDROID_TOOLS=$ANDROID_HOME/tools | |
export ANDROID_BUILD_TOOLS=$ANDROID_HOME/build-tools/$ANDROID_SDK_VERSION | |
export ANDROID_PLATFORM_TOOLS=$ANDROID_HOME/platform-tools | |
PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS:$ANDROID_BUILD_TOOLS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.policante.meuapptest; | |
import android.os.Bundle; | |
import android.support.v7.app.AlertDialog; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.GridLayout; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Merge Script | |
# 1 | |
# Set bash script to exit immediately if any commands fail. | |
set -e | |
# 2 | |
# Setup some constants for use later on. | |
FRAMEWORK_NAME="SampleFramework" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -s "http://api.bitly.com/v3/shorten?login=[LOGIN]&apiKey=[API_SECRET]&longUrl=$1&format=txt" | pbcopy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView { | |
func startShimmering(){ | |
let light = UIColor.white.cgColor | |
let alpha = UIColor.white.withAlphaComponent(0.7).cgColor | |
let gradient = CAGradientLayer() | |
gradient.colors = [alpha, light, alpha, alpha, light, alpha] | |
gradient.frame = CGRect(x: -self.bounds.size.width, y: 0, width: 3 * self.bounds.size.width, height: self.bounds.size.height) | |
gradient.startPoint = CGPoint(x: 0.0, y: 0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#f2f2f2"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar_main" | |
android:layout_width="match_parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.view.GestureDetector; | |
import android.view.GestureDetector.SimpleOnGestureListener; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.View.OnTouchListener; | |
public class OnSwipeTouchListener implements OnTouchListener { | |
private final GestureDetector gestureDetector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CountDown { | |
private CountDownTimer countDownTimer; | |
private int timeSeconds = 30; | |
public CountDown(){ | |
countDownTimer = new CountDownTimer(timeSeconds * 1000, 1000) { | |
@Override | |
public void onTick(long millisUntilFinished) { | |
String v = String.format("%02d", millisUntilFinished / 60000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'MyProject' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| |
OlderNewer