Skip to content

Instantly share code, notes, and snippets.


Fernando Raviola feresr

View GitHub Profile
View gist:3ddf25f38f97d01e9838ae2f2f660b6a
// `dependencies.gradle`
def jumio_version = "3.7.2"
jumio = [
core : "${jumio_version}@aar",
netverify : "${jumio_version}@aar",
face : "${jumio_version}@aar",
auth : "${jumio_version}@aar",
zoom_authentication: "com.facetec:zoom-authentication:8.12.1@aar"
feresr / shaders.cpp
Created Aug 31, 2020
Simple openGL GLSL vertex+fragment shader
View shaders.cpp
void checkCompileErrors(unsigned int object, std::string type) {
int success;
char infoLog[1024];
if (type != "PROGRAM") {
glGetShaderiv(object, GL_COMPILE_STATUS, &success);
if (!success) {
glGetShaderInfoLog(object, 1024, NULL, infoLog);
std::cout << "| ERROR::SHADER: Compile-time error: Type: " << type << "\n"
<< infoLog << "\n -- --------------------------------------------------- -- "
<< std::endl;
feresr / CMakeLists.txt
Created Apr 18, 2020
Link SDL statically
View CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
add_executable(smb src/main.cpp)
target_link_libraries(smb ${SDL2} ${SDL2_IMAGE})
View sdl.cmake
# sdl2 cmake project-config input for ./configure scripts
set(prefix "/usr/local/Cellar/sdl2/2.0.12_1")
set(exec_prefix "${prefix}")
set(libdir "${exec_prefix}/lib")
set(SDL2_PREFIX "/usr/local/Cellar/sdl2/2.0.12_1")
set(SDL2_EXEC_PREFIX "/usr/local/Cellar/sdl2/2.0.12_1")
set(SDL2_LIBDIR "${exec_prefix}/lib")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
View Ktor 1140
Fatal Exception: java.lang.IllegalStateException
Operation is already in progress
Fatal Exception: java.lang.IllegalStateException: Operation is already in progress
at io.ktor.client.response.HttpResponse$close$1.invokeSuspend(
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.b + 6(
feresr /
Last active Jul 12, 2019
Walpy - Privacy Policy

Privacy Policy

This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use Walpy.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Walpy unless otherwise defined in this Privacy Policy.

Information Collection and Use

View Presenter.kt
abstract class BasePresenter<I : MVI.Intent, S : MVI.ViewState> {
private val intents: PublishSubject<I> = PublishSubject.create<I>()
private var states: Observable<S>? = null
private var disposable: Disposable? = null
private var viewDisposable: Disposable? = null
fun onCreate() {
states = intents
View adapter.kt
package com.feresr.wallpapers.wallpapers
class WallpapersAdapter(private val context: Context, private val inflater: LayoutInflater) : BaseAdapter<Wallpaper>() {
companion object {
val TYPE_LOADING: Int = 1
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, item: Wallpaper) {
View gist:9d5b550caf443ea6da7b0092eb454c28
class MyBroadcastReceiver(val listener : MyBroadcastListener) extends BroadcastReceiver() {
override fun onReceive(p0: Context?, p1: Intent?) {
interface MyBroadcastListener {
fun onSomeEventHappened()
View gist:c2bc2ae8950907a618427d7381993f30
private fun <T> any(): T {
 return uninitialized()
 private fun <T> uninitialized(): T = null as T