Skip to content

Instantly share code, notes, and snippets.

View Phonbopit's full-sized avatar
👻
¯\_ (ツ) _/¯

Chai Phonbopit Phonbopit

👻
¯\_ (ツ) _/¯
View GitHub Profile
@Phonbopit
Phonbopit / AndroidManifest.xml
Last active March 6, 2019 07:55
Android GSON with Custom ListView Tutorial , Article Link: http://devahoy.com/2014/05/android-custom-listview-with-gson-tutorial/
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.devahoy.sample.ahoygson" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
@Phonbopit
Phonbopit / MainActivity.java
Created May 21, 2014 07:49
Android Button OnClick Tutorial
package com.devahoy.android.sample.button;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends ActionBarActivity implements View.OnClickListener {
public class AndroidLauncher extends AndroidApplication {
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
initialize(new MyGame(), config);
}
}
@Phonbopit
Phonbopit / README.md
Created May 27, 2014 03:15
Python SimpleHTTPServer

Python 2.x

python -m SimpleHTTPServer portNumber

Python 3

python3 -m http.server portNumber

Oops! I accidentally deleted a local git branch, and I haven't pushed it to a remote server yet. The branch has several important commits, and it hasn't been merged with any other branches yet. How do I find the missing branch?

1. Create a list of all dangling or unreachable commits.

$ git fsck --full --no-reflogs --unreachable --lost-found
unreachable tree 4a407b1b09e0d8a16be70aa1547332432a698e18
unreachable tree 5040d8cf08c78119e66b9a3f8c4b61a240229259
unreachable tree 60c0ce61b040f5e604850f747f525e88043dae12
unreachable tree f080522d06b9853a2f18eeeb898724da4af7aed9
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.devahoy.sample.uil"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-sdk
AdView adView = (AdView) rootView.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.build();
adView.loadAd(adRequest);
package com.phonbopit.sample.dialog;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
package com.devahoy.sample.achartengine;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
@Phonbopit
Phonbopit / Player.json
Created July 6, 2014 08:21
Player.json
{ "results": [
{
"age": 27,
"club": "Barcelona",
"createdAt": "2014-07-06T08:13:06.949Z",
"name": "Leonel Messi",
"national": "Argentina",
"objectId": "njnpkIM7TZ",
"updatedAt": "2014-07-06T08:13:18.128Z"
},