Skip to content

Instantly share code, notes, and snippets.

@haridhayal11
haridhayal11 / exynos2100_gcam_guide.md
Last active April 2, 2024 01:36
Google Camera for Galaxy S21 Series

Google Camera for Galaxy S21 Series

  • Tested on
    • OneUI 4.x/5.x based Stock/Custom ROMs.
    • GSI with OneUI 4.x/5.x stock firmware.
    • Front Camera Does not work.

S21, S21 FE & S21 Plus

  • 0.5x, 1x and 3x lenses work.

Instructions

@marcospgp
marcospgp / SafeTask.cs
Last active January 13, 2024 22:58
Cancel async tasks in Unity upon exiting play mode
using System;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
namespace UnityUtilities
{
/// <summary>
/// A replacement for `Task.Run()` that cancels tasks when entering or
/// exiting play mode in the Unity editor (which doesn't happen by default).
@monodop
monodop / snowrunner_uwp_to_steam.py
Created June 29, 2021 17:20
Convert Snowrunner UWP Saves to Steam
import os
import struct
import sys
import uuid
import zipfile
import json
# Snowrunner save "converter" (Xbox Game Pass for PC -> Steam)
# Might work for other games available with the Game Pass if the app name is changed.
# Running: Just run the script with Python 3 to create a ZIP file that contains the save files
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityToolbarExtender;
/// <summary>
@MaZyGer
MaZyGer / EditorModeOnly
Last active April 22, 2024 08:49
The default EditorOnly of Unity Engine will only remove objects from standalone player and not in the editor. EditorModeOnly will remove also objects if you start playmode in the editor. Its really nice for things such as UI List tests, to remove the list in play mode. You can remove or change the namespace if you want. Drop it in an Editor fold…
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;
namespace Maz.Unity.EditorExtensions
{
[InitializeOnLoad]
public class EditorModeOnly
{
@davlgd
davlgd / WinGetMulti.ps1
Last active September 25, 2023 16:50
PowerShell scripts to make WinGet great again
<# Script to install multiple applications in one command line through WinGet
You can modify bootstrapArray value and use "--bootstrap" argument to bootstrap a new machine
Don't forget to change ExecutionPolicy to execute this script
Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope CurrentUser #>
$bootstrapArray = @("vlc", "7zip", "cpu-z", "coretemp")
if ((New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
if ($args[0] -ne "--bootstrap") { $bootstrapArray = $args }
@MarkTiedemann
MarkTiedemann / download-latest-release.ps1
Last active March 4, 2024 18:39
Download latest GitHub release via Powershell
# Download latest dotnet/codeformatter release from github
$repo = "dotnet/codeformatter"
$file = "CodeFormatter.zip"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();