Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working from anywhere

Raphaël Bussa raphaelbussa

💻
Working from anywhere
View GitHub Profile
@raphaelbussa
raphaelbussa / PrintHelper.java
Last active May 3, 2016
Simple helper for print an url or an html
View PrintHelper.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Raphaël Bussa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@raphaelbussa
raphaelbussa / ChromeCustomTabHelper.java
Last active May 6, 2016
A simple chrome custom tab helper, remeber to add compile 'com.android.support:customtabs:23.3.0' in your build.gradle
View ChromeCustomTabHelper.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Raphaël Bussa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
View redirect-oauth2.php
<?php
header('Content-Type: application/json');
$response = array();
$code= $_GET["code"];
if ($code == "") {
$response["success"] = false;
} else {
$response["success"] = true;
$response["code"] = $code;
}
@raphaelbussa
raphaelbussa / YouTubeItem
Created May 31, 2015
A simple parser for new video from a YouTube user, remember add Jsoup (http://jsoup.org/) in your project for parse XML
View YouTubeItem
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Raphael Bussa <raphaelbussa@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@raphaelbussa
raphaelbussa / PreferenceList.xml
Last active Aug 29, 2015
List view for custom preference activity android
View PreferenceList.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="vertical" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
View redirect.php
<?php
$url_redirect= $_GET["url"];
header("Location: ".$url_redirect);
?>