Skip to content

Instantly share code, notes, and snippets.

View mfdeveloper's full-sized avatar
🕹️
Creating games and mobile apps, every day!

Felipe Michel mfdeveloper

🕹️
Creating games and mobile apps, every day!
View GitHub Profile
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Unity.Services.CloudSave;
using UnityEngine;
public class CloudSaveClient : ISaveClient
{
private readonly ICloudSaveDataClient _client = CloudSaveService.Instance.Data;
@joulgs
joulgs / terminal.txt
Last active April 28, 2024 17:42
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@GeorgeTsiokos
GeorgeTsiokos / TaskCompletionSourceDictionary.cs
Last active October 27, 2023 19:50
TaskCompletionSourceDictionary - key is generic, value can be any result, with runtime type check to ensure producer and consumer type parity
[DebuggerDisplay("Count = {" + nameof(Count) + "}")]
public sealed class TaskCompletionSourceDictionary
{
private readonly TaskCompletionSourceDictionary<Type> _dictionary = new TaskCompletionSourceDictionary<Type>();
public int Count => _dictionary.Count;
public bool TryGetValue<T>(out TaskCompletionSource<T> taskCompletionSource) =>
_dictionary.TryGetValue(typeof(T), out taskCompletionSource);
@DanielJenkyn
DanielJenkyn / install_obb.sh
Last active February 12, 2024 09:00
Script to install .apk and .obb (Split binary) onto Android device
#!/bin/bash
project_name= com.jenkyncorp.bestapp
reinstall=
# Takes the most recent .apk and .obb (If you have multiple files)
OBB=$(ls -t *.obb | head -n1)
APK=$(ls -t *.apk | head -n1)
while [ "$1" != "" ]; do
#!bash
#
# git-flow-completion
# ===================
#
# Bash completion support for [git-flow](http://github.com/nvie/gitflow)
#
# The contained completion routines provide support for completing:
#
# * git-flow init and version
@jesugmz
jesugmz / Python-docstring-restructuredtext-style.rst
Last active April 24, 2024 14:34
Python docstring reStructuredText style

Python docstring reStructuredText style

Python Signatures

Signatures of functions, methods and class constructors can be given like they would be written in Python.

fun ViewPropertyAnimator.setListener(init: ViewPropertyAnimator.() -> Unit) {
this.init()
}
inline fun ViewPropertyAnimator.onAnimationEnd(crossinline continuation: (Animator) -> Unit) {
setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
continuation(animation)
}
@Korilakkuma
Korilakkuma / headless-webaudio.js
Last active February 24, 2022 15:04
Web Audio API Library (https://github.com/Korilakkuma/XSound) on Headless Chrome
'use strict';
const chrome = require('chrome-remote-interface');
const ChromeLauncher = require('chrome-launcher').Launcher;
function launchChrome() {
const launcher = new ChromeLauncher();
return Promise.resolve(launcher);
}
@nieldeokar
nieldeokar / SimpleVibrateDemoActivity.java
Last active September 1, 2023 11:04
Android Vibrate & VibrationEffect class demo Usage
package com.example.nileshdeokar.simplevibratedemo;
import android.os.Build;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
/*
@Macrow
Macrow / gist:99e2be7208dd42d76c0be8556dc785b0
Created May 24, 2017 17:00
Android, RxJava and Retrofit: Wait for multiple network calls to finish
[url]https://newfivefour.com/android-rxjava-wait-for-network-calls-finish.html[/url]
Android, RxJava and Retrofit: Wait for multiple network calls to finish
Say you have multiple network calls you need to make–cals to get Github user information and Github user events for example.
And you want to wait for each to return before updating the UI. RxJava can help you here.
Let’s first define our Retrofit object to access Github’s API, then setup two observables for the two network requests above: