Skip to content

Instantly share code, notes, and snippets.

@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active May 4, 2024 14:06
React Native Bridging Cheatsheet
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@fada21
fada21 / PicassoBigCache.java
Last active March 14, 2018 10:34
Disk cache larger size for Picasso OkHttp (use like PicassoBigCache.INSTANCE.getPicassoBigCache(ctx) -> rest as in regular Picasso api .
package com.?
import java.io.File;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.StatFs;
import com.squareup.picasso.Downloader;
@chrisjenx
chrisjenx / GsonBuilder.java
Last active October 19, 2015 18:47
Custom Gson Serialiser for android.support.v4.util.SimpleArrayMap;
return new GsonBuilder()
.registerTypeAdapter(SimpleArrayMapJsonSerializer.TYPE, new SimpleArrayMapJsonSerializer())
.create();
@weakish
weakish / code.md
Last active April 17, 2023 13:15
The Six Most Common Species Of #Code #java #fun
@sixman9
sixman9 / glCube13vTriangleStripFragC.txt
Created March 2, 2011 16:02
How to draw a cube using 13 Triangle Strip vertices.
How to draw a Cube with OpenGL's Triangle strip (non-Vertex buffer object example, 13 vertices)
gl.glBegin(gl.GL_TRIANGLESTRIP);
gl.glVertex(100,100,−100);
gl.glVertex(100,300,−100);
gl.glVertex(300,300,−100);
gl.glVertex(300,300,−300);
gl.glVertex(300,100,−300);