Skip to content

Instantly share code, notes, and snippets.

View fourjr's full-sized avatar
👋
hello!

Jia Rong fourjr

👋
hello!
  • singapore
View GitHub Profile
@fourjr
fourjr / permissions.json
Last active February 6, 2025 03:30
Android Permissions (JSON format)
[
{
"name": "ACCEPT_HANDOVER",
"api_level": "Added in API level 28",
"description": "Allows a calling app to continue a call which was started in another app. An example is a video calling app that wants to continue a voice call on the user's mobile network. When the handover of a call from one app to another takes place, there are two devices which are involved in the handover; the initiating and receiving devices. The initiating device is where the request to handover the call was started, and the receiving device is where the handover request is confirmed by the other party. This permission protects access to the TelecomManager.acceptHandover(Uri, int, PhoneAccountHandle) which the receiving side of the handover uses to accept a handover.",
"protection_level": [
"dangerous"
],
"constant_value": "android.permission.ACCEPT_HANDOVER"
},
@fourjr
fourjr / guide.md
Created October 23, 2024 05:47
using systemctl

Using Systemctl

Adapted/shortened from digitalocean

Creating a unit file

nano /etc/systemd/system/app.service

[Unit]
Description=App
@fourjr
fourjr / avd.md
Last active May 27, 2023 06:18
avd manager (lightweight)

Using AVD

  1. Install command line tools
  2. Unzip into C:\Android\cmdline-tools\tools
  3. Make sure folder C:\Android\cmdline-tools\tools\bin exists. Add to PATH.
  4. Run sdkmanager --install platform-tools emulator extras;intel;Hardware_Accelerated_Execution_Manager
  5. Run sdkmanager --list
  6. Pick a system-images using the following guide
  7. Pick a platforms that has the same android version as the system image selected
  8. Run sdkmanager --install system-images;... platforms;... (e.g. sdkmanager --install system-images;android-33;google_apis;x86_64 platforms;android-33
@fourjr
fourjr / Discord Loading Lines.js
Last active March 12, 2025 23:33
loading lines
welcome messages: "https://gist.github.com/fourjr/0f47ce8a000c29cd4e24f8aeb7edd8e0"
Somewhere in 2020, they changed their loading lines to be more (professional?).
Ctrl+Shift+I > Application > Frames > top > Scripts > a3762dfb973e0a7a21ba.js > ctrl+f "LOADING_LINE" or https://canary.discordapp.com/assets/a3762dfb973e0a7a21ba.js
LOADING_LINE_1: "Discord was almost called Bonfire before we picked our name. It was meant to be nice and cozy.",
LOADING_LINE_2: "Discord was almost called Wyvern before we picked our name. Not too proud of that one.",
LOADING_LINE_3: "Our logo's name is Clyde.",
LOADING_LINE_4: 'There are a bunch of hidden "Easter Eggs" in the app that happen when you click certain things...', LOADING_LINE_5: "Discord started as a game company making a mobile game called Fates Forever.",
LOADING_LINE_6: "Discord’s official birthday is May 13, 2015.",
@fourjr
fourjr / Discord Join Messages.js
Last active September 29, 2024 09:32
new member messages discord
loading lines: "https://gist.github.com/fourjr/f94fc112cef6da07fc274216d5755420"
Somewhere in 2020, they reduced the messages from 38 to 13.. This is the updated list on 5 December 2020.
Ctrl+Shift+I > Application > Frames > top > Scripts > a3762dfb973e0a7a21ba.js > ctrl+f "GUILD_MEMBER_JOIN" or https://canary.discordapp.com/assets/a3762dfb973e0a7a21ba.js
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_001: "[!!{username}!!](usernameOnClick) joined the party.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_002: "[!!{username}!!](usernameOnClick) is here.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_003: "Welcome, [!!{username}!!](usernameOnClick). We hope you brought pizza.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_004: "A wild [!!{username}!!](usernameOnClick) appeared.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_005: "[!!{username}!!](usernameOnClick) just landed.",