Skip to content

Instantly share code, notes, and snippets.

View 4gus71n's full-sized avatar

Agustín Tomas Larghi 4gus71n

  • Myself
  • Mar del Plata
View GitHub Profile
public class ISO8601DateAdapter implements JsonSerializer<Date>, JsonDeserializer<Date> {
public ISO8601DateAdapter() {
}
@Override
public Date deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
if (!(json instanceof JsonPrimitive)) {
throw new JsonParseException("The date should be a string value");
}
Date date = deserializeToDate(json);
<html>
<header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
function dec2bin(dec){
return (dec >>> 0).toString(2);
}
function generateUrls(baseN) {
//Example 1...
//I want to get data from the server-side
mRepository.getDogsFromServerSide()
//If there's no internet connection I want to plug the database cache
.onErrorResumeNext(ObservableUtils.whenExceptionIs(UnknownHostException.class, mDogsCache.getAllDogs()))
//If something goes wrong on the server-side I want to plug the memory cache
.onErrorResumeNext(ObservableUtils.whenExceptionIs(ServerSideException.class, mMemoryDogsCache.getAllDogs()))
//I want to turn each Dog into a Cat
.map(new Func1<DataSource<List<Dog>>, DataSource<List<Cat>>>() {
@Override
package com.siplay.android_siplay.helper;
/**
* Created by Agustin Tomas Larghi on 23/12/2016.
* Email: agustin.tomas.larghi@gmail.com
*/
public abstract class DefaultSubscriber<T> extends rx.Subscriber<T> {
@Override
package com.siplay.android_siplay.helper;
import android.support.annotation.CallSuper;
import retrofit2.Response;
/**
* Created by Agustin Tomas Larghi on 20/04/2017.
* Email: agustin.tomas.larghi@gmail.com
*/
@4gus71n
4gus71n / testing.html
Last active April 4, 2017 13:22
testing.html
<html><head><script type="text/javascript">
window.location = 'siplay://createaccount/88751916637a4c58b0c1a4f9fdb04e21';</script></head><body></body></html>
03-21 18:37:31.254 2851-2920/? E/ViewRootImpl: sendUserActionEvent() mView == null
03-21 18:37:31.514 8958-8958/? E/Zygote: v2
03-21 18:37:31.514 8958-8958/? E/Zygote: accessInfo : 0
03-21 18:37:32.464 8979-8979/com.siplay.android_siplay E/Zygote: v2
03-21 18:37:32.464 8979-8979/com.siplay.android_siplay E/Zygote: accessInfo : 0
03-21 18:37:32.604 8998-8998/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@app@com.siplay.android_siplay-2@split_lib_dependencies_apk.apk@classes.dex: Permission denied
03-21 18:37:33.554 5953-5953/? E/SignalClusterView: setSlotFocusVisible : subId 3
03-21 18:37:33.554 5953-5953/? E/SignalClusterView: setSlotFocusVisible : subId 3
03-21 18:37:33.644 9020-9020/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@app@com.siplay.android_siplay-2@split_lib_slice_0_apk.apk@classes.dex: Permission denied
03-21 18:37:33.894 9030-9030/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@app@com.siplay.android_siplay-2@split_lib_slice_1_apk.a
<!DOCTYPE html>
<!-- saved from url=(0083)https://subscription.timeinc.com/storefront/privacy/siplay/generic_privacy_new.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript" async="async" src="./SI Play Privacy Policy for the US_files/id"></script><script type="text/javascript" async="async" src="./SI Play Privacy Policy for the US_files/id(1)"></script><script type="text/javascript" async="async" src="./SI Play Privacy Policy for the US_files/id(2)"></script>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>SI Play Privacy Policy for the US</title>
<style type="text/css">
<html>
<body>
<ul>
<li><a href="siplay://invite/team/SS-66666666">SI PLAY invite/team/SS-6666666 (Bad team guid)</a></li>
<li><a href="siplay://addteammates/SS-960269">AddTeamMembers to NoSoyTeamAdmin's Team (Prod) (NEW)</a></li>
<li><a href="siplay://addteammates/SS-923586">AddTeamMembers to Agu's Team (Prod) (NEW)</a></li>
@4gus71n
4gus71n / servers.json
Last active December 25, 2016 23:20
Torrent servers & mirrors
[{"name" : "piratebay", "urls" : ["https://fastpiratebay.co.uk/", "https://pirate.trade/", "https://thebay.tv/", "https://urbanproxy.eu/", "https://pirateproxy.yt/",
"https://pirateproxy.yt/", "https://pirateproxy.wf/", "https://ukpirate.click/", "https://pirateproxy.tf/", "https://pirateproxy.online/",
"https://thepiratebay-proxy.com/"]}, {"name" : "kickass", "urls" : ["http://kickasstorrents.to/", "http://katcr.to/", "http://katcr.to/"]}]