Skip to content

Instantly share code, notes, and snippets.

@wojtekmaj
wojtekmaj / .gitignore
Last active July 25, 2024 06:12
How to upgrade Yarn to Yarn Modern (v4 at the moment) seamlessly
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
@co3moz
co3moz / lock.ts
Last active July 17, 2019 02:47
Locking mechanism for critical tasks with basic deadlock prevention and acquire timeout features
export class Lock {
private chain: Promise<any> = Promise.resolve(null);
busy = false;
acquire(deadlockSafeTimeout = 0, acquireTimeout = 0) {
let acquireTimeoutId: any = null;
let acquireFailed = false;
let unlock: () => void;
let unlockingPromise = new Promise(r => unlock = r);
@Kudo
Kudo / Steps_for_WebkitGTK_2_24_2.md
Last active September 5, 2023 10:16
Steps to integrate experimented JSC

Intro

Here are the steps to integrate experimented JavaScriptCore. Hopefully this could solve the JSC crash issue on RN 0.59.

Steps (for RN 0.59)

  1. yarn add 'jsc-android@next'
  2. Modify build.gradle files.
diff --git a/android/app/build.gradle b/android/app/build.gradle
@alvr
alvr / packages.md
Last active August 9, 2024 15:07
Available Packages

Available Packages:

Path Version Description
add-ons;addon-google_apis-google-15 3 Google APIs
add-ons;addon-google_apis-google-16 4 Google APIs
add-ons;addon-google_apis-google-17 4 Google APIs
add-ons;addon-google_apis-google-18 4 Googl
@arjunv
arjunv / keyevents.json
Created December 2, 2018 00:01
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",
@ernestkamara
ernestkamara / AdbCommands
Created June 26, 2018 08:42 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@co3moz
co3moz / thecrims-bukakale.js
Last active August 12, 2024 19:41
thecrims-bot
var getRobberies = function (done) {
console.log('%c Soygun seçiliyor.', 'background: black; color: white')
$.ajax({
type: "GET",
url: 'https://www.thecrims.com/api/v1/robberies',
success: function (res) {
done(res.single_robberies
.filter(robbery => robbery.successprobability == 100)
.sort((a, b) => b.difficulty - a.difficulty)
.find((x, index) => index == 0))
@unnamedd
unnamedd / apns.sh
Last active October 28, 2020 10:12 — forked from greencoder/apns.sh
cURL the APNS HTTP/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>
@deanlyoung
deanlyoung / url-schemes-settings-ios.mkd
Last active September 17, 2024 12:32 — forked from phynet/url-schemes-settings-ios.mkd
URL Schemes (Updated)

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active August 8, 2024 10:02
React Native Bridging Cheatsheet