Skip to content

Instantly share code, notes, and snippets.

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

Ariel Magbanua arielmagbanua

🏠
Working from home
View GitHub Profile
XDA - guide
http://forum.xda-developers.com/showthread.php?t=2528952
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 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
@arielmagbanua
arielmagbanua / rounded_rectangle.xml
Created April 16, 2015 14:18
Android Drawable Shape: Rectangle with Rounded Corners
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- fill/color -->
<solid
android:color="#ff0000"/>
<!-- Control the width and height of the shape -->
<size
@arielmagbanua
arielmagbanua / master
Created June 19, 2015 02:48
Flexible Laravel Blade Template
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>@yield('title', 'default title')</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
@yield('meta')
@arielmagbanua
arielmagbanua / JSONParser
Created July 13, 2015 13:26
Api Call with TrustStore and KeyStore certificates for SSL
package com.medic52.utilities;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.security.KeyStore;
import java.util.HashMap;
import java.util.Iterator;
@arielmagbanua
arielmagbanua / flash.blade.php
Created October 8, 2015 02:00
laravel flashing blade template
@if(session()->has('flash_message'))
<div class="row container-fluid">
<?php
$messageImportant = session()->has('flash_message_important') && session('flash_message_important');
$alertType = session()->has('flash_message_alert_class') ? session('flash_message_alert_class') : '';
?>
<div class="alert {{ $alertType }} {{ $messageImportant ? 'alert-important' : '' }}">
@arielmagbanua
arielmagbanua / jslibraries.txt
Created October 8, 2015 02:55
Javascript Libraries
//bootstrap datepicker
https://eternicode.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox
@arielmagbanua
arielmagbanua / nationalities.php
Created October 13, 2015 15:12 — forked from zspine/nationalities.php
PHP Nationalities Array
$nationals = array(
'Afghan',
'Albanian',
'Algerian',
'American',
'Andorran',
'Angolan',
'Antiguans',
'Argentinean',
'Armenian',
@arielmagbanua
arielmagbanua / quick_guide_google_maps_android.txt
Created January 19, 2016 07:34
Quick Guide for Google Maps API for Android
Create a new project
File -> New -> Android Application Project
You can leave all the options with their default value
Choose BlankActivity in the Create Activity screen
Ensure you have the latest version (v2) of the Google Play Services installed.
Select Window > Android SDK Manager or run android at the command line.
Scroll to the bottom of the package list and select Extras > Google Play services.
The Google Play services SDK is downloaded to your computer and installed in your Android SDK environment at <android-sdk-folder>/extras/google/google_play_services/
@arielmagbanua
arielmagbanua / loadJSONFromAsset.txt
Created January 27, 2016 04:45
Reading local json from asset folder in android
public String loadJSONFromAsset() {
String json = null;
try {
InputStream is = getAssets().open("file_name.json");
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
@arielmagbanua
arielmagbanua / App.java
Created January 27, 2016 05:34
Android Application Object Singleton
import android.app.Application;
/**
* Created by magbanua-ariel on 27/01/2016.
*/
public class App extends Application{
private static App instance = null;
public static App getInstance(){