Skip to content

Instantly share code, notes, and snippets.

@agnostic-apollo
agnostic-apollo / hasFragileUserData.md
Last active March 29, 2024 11:53
Android hasFragileUserData AndroidManifest.xml flag

The hasFragileUserData flag can be added to the application node of AndroidManifest.xml. If its value is true, then when the user uninstalls the app, a prompt will be shown to the user asking him whether to keep the app's data.

<application
	...
    android:hasFragileUserData="true" tools:targetApi="q">
...
</application>
@shingming
shingming / SaveImage2AndroidGallery.cs
Last active March 29, 2024 11:52
Unity3D: Save Image to Android Gallery (Test on API level 28 - 33)
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SaveImage2AndroidGallery
{
/// <summary>
/// Save the image byte data to the Android gallery.
@Srfigie
Srfigie / .gitattributes
Created February 2, 2020 14:30 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@lbialy
lbialy / graalvm-in-docker.txt
Created March 28, 2024 21:30
Have fun Anton
$ sbt new http4s/http4s.g8 --branch 1.0-scala3
// use all the defaults, just set sbt to 1.9.9
$ cd quickstart
$ sbt assembly
$ cat Dockerfile # create this file with these contents:
FROM ghcr.io/graalvm/jdk-community:22
RUN mkdir /opt/app
@deepanchal
deepanchal / starship.toml
Last active March 29, 2024 11:51
Starship config
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
.386
.model flat, stdcall
option casemap:none
assume fs:nothing
.code
start:
xor ecx, ecx ; ecx = 0
mov esi, fs:[ecx + 30h] ; esi = &(PEB) (FS:[0x30])
@SoabY
SoabY / JetBrains products Activation code until 15 May 2024
Created October 1, 2023 08:04
JetBrains products Activation code until 15 May 2024
8Z6IT0PIZH-eyJsaWNlbnNlSWQiOiI4WjZJVDBQSVpIIiwibGljZW5zZWVOYW1lIjoiSHVuYW4gTm9ybWFsIFVuaXZlcnNpdHkiLCJhc3NpZ25lZU5hbWUiOiJTdGFyayB6aGFuZyIsImFzc2lnbmVlRW1haWwiOiJzdGFyazE5ODUyMDIwQGdtYWlsLmNvbSIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyNC0wNS0xNSIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0YiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiRFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBDIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZ
@amullins83
amullins83 / README.md
Last active March 29, 2024 11:43
A simple command-line progress bar in C

#Progress in C

This is in an example meant to present some ideas regarding command-line progress bars in C.

##Important parts

The main idea is to overwrite stdout with new information every time a particular step is reached. I accomplished this using the VT100 emulator hack from [this Stack Overflow answer][1]. In a nutshell, printing ^[[2K to stdout erases the current line, but it doesn't necessarily move the cursor to the start. Printing \r does that. Also, I decided I wanted to print a newline character after the progress indicator, but I need to get rid of that newline on the next print. That's what \b does: it inserts a backspace, deleting the last character printed.

Also important is the call to fflush, which will guarantee that the print operation completes and is visible before the program moves on to its next task (see [this Stack Overflow answer][2]).

@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active March 29, 2024 11:39
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@ih2502mk
ih2502mk / list.md
Last active March 29, 2024 11:38
Quantopian Lectures Saved