Skip to content

Instantly share code, notes, and snippets.

View billyriantono's full-sized avatar
:octocat:
git commit -m "Welcome"

Billy R billyriantono

:octocat:
git commit -m "Welcome"
  • Around the world
View GitHub Profile
@jonfinerty
jonfinerty / CrashlyticsTree.java
Created May 12, 2016 16:46
Report Android Exceptions - Crashlytics Tree for Timber
import android.util.Log;
import com.crashlytics.android.Crashlytics;
import timber.log.Timber;
public class CrashlyticsTree extends Timber.Tree {
@Override
protected boolean isLoggable(int priority) {
@lopspower
lopspower / README.md
Last active July 17, 2025 21:04
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@173210
173210 / blob.txt
Created February 7, 2016 02:55
Hidden blobs in XT1093
# ls -l /firmware/image
-rw-r--r-- root root 500 2014-08-30 08:53 adsp.b00
-rw-r--r-- root root 6888 1970-05-10 08:34 adsp.b01
-rw-r--r-- root root 1 2014-08-30 08:53 adsp.b02
-rw-r--r-- root root 5095408 2014-08-30 08:53 adsp.b03
-rw-r--r-- root root 1308461 2014-08-30 08:53 adsp.b04
-rw-r--r-- root root 1096090 2014-08-30 08:53 adsp.b05
-rw-r--r-- root root 912 2014-08-30 08:53 adsp.b06
-rw-r--r-- root root 939558 2014-08-30 08:53 adsp.b07
-rw-r--r-- root root 120 2014-08-30 08:53 adsp.b08
@mchirico
mchirico / SimpleSwiftIOSreadWrite.swift
Created October 15, 2015 15:07
Swift read and write to fileURL in iOS
import UIKit
/*
Example way to use the class below
let rw = RW()
var mDict:[String:String] = ["one":"1","two":"2"]
rw.write("test0",mDict: mDict)
@mabasic
mabasic / helpers.php
Last active February 3, 2025 19:47
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@samklr
samklr / install-proto.sh
Created April 20, 2015 08:19
Install Protobuf debian ...
#! /bin/bash
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar xzf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
sudo apt-get update
sudo apt-get install build-essential
sudo ./configure
sudo make
sudo make check
sudo make install
@nostah
nostah / gist:d610459d50564c729c56
Created April 13, 2015 07:42
php swagger 2.0 api sample
<?php
use Swagger\Annotations as SWG;
/**
* @SWG\Swagger(
* basePath="/v1",
* host="api.local",
* schemes={"http"},
* produces={"application/json"},
@xxnjdlys
xxnjdlys / add log to smali code
Created April 10, 2015 06:43
add log to smali code
package com.sadieyu.logg;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
/*
.class public Lcom/sadieyu/logg/MainActivity;
.super Landroid/app/Activity;
.source "MainActivity.java"
@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active September 30, 2024 18:02
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

@mheras
mheras / HeaderFooterRecyclerViewAdapter.java
Last active January 12, 2024 17:33
Header & footer support for RecyclerView.Adapter
public abstract class HeaderFooterRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int VIEW_TYPE_MAX_COUNT = 1000;
private static final int HEADER_VIEW_TYPE_OFFSET = 0;
private static final int FOOTER_VIEW_TYPE_OFFSET = HEADER_VIEW_TYPE_OFFSET + VIEW_TYPE_MAX_COUNT;
private static final int CONTENT_VIEW_TYPE_OFFSET = FOOTER_VIEW_TYPE_OFFSET + VIEW_TYPE_MAX_COUNT;
private int headerItemCount;
private int contentItemCount;
private int footerItemCount;