To add code
to PATH in macOS (in order to run code from the command line) we may to open up VS Code and open the 'Command Palette' with Shift+Command+P on Mac, or Shift+Control+P on Linux. In it, enter shell command and look for the Shell Command: Install 'code' command in PATH option. After doing this any new shell we open should be able to run code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* MIT License | |
* | |
* Copyright (c) 2022 Albert Chang | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Parcel; | |
import android.os.Parcelable; | |
public class ParcelTestHelper { | |
public static String DEFAULT_CREATOR_FIELD = "CREATOR"; | |
public static <T extends Parcelable> T createFromParcel(T input, Parcelable.Creator<T> creator) { | |
Parcel parcel = toParcel(input); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
NewerOlder