This mapping fixes the flipp of the X/Y Triangle/Square buttons on the controller. I needed this fix for game dev and for the PS2 emulator, PCSX2
insert the following line into the game_controller_db.txt file, on macOS, file can be found:
| class Mutex { | |
| constructor() { | |
| this.current = Promise.resolve(); | |
| } | |
| async acquire() { | |
| let release | |
| const next = new Promise(resolve => { | |
| release = () => { resolve(); }; |
| import {useCallback} from 'react'; | |
| import {Alert, Linking, Platform} from 'react-native'; | |
| const APPLE_MAPS_LINK = 'https://maps.apple.com/?address='; | |
| const GOOGLE_MAPS_LINK = 'https://www.google.com/maps/search/?api=1&query='; | |
| type AddressStringFunc = (address: string) => Promise<void>; | |
| export const useOpenMapsWithAddress = (): AddressStringFunc => { | |
| return useCallback(async (address: string) => { |
| class RateLimiter { | |
| public int fps = 100; | |
| public bool isActive = true; | |
| private float? timer = null; | |
| public RateLimiter(int fps, bool immediate = false) { | |
| this.fps = fps; | |
| if (immediate) this.Invalidate(); | |
| else this.Reset(); | |
| } |
This mapping fixes the flipp of the X/Y Triangle/Square buttons on the controller. I needed this fix for game dev and for the PS2 emulator, PCSX2
insert the following line into the game_controller_db.txt file, on macOS, file can be found:
| function fixMediumLink(link) { | |
| const text = document.createElement('input') | |
| text.value = encodeURI(link.replace('sh/embed', 'sh').replace(/sh\/?/, 'sh/embed')) | |
| text.select(); | |
| document.execCommand("copy"); | |
| return text.value | |
| } |
| const _ = require('lodash'); | |
| /** | |
| * File adds a "getNonNull" function to the set of the lodash functions | |
| * function works exactly like `_.get` with one simple exception | |
| * the _.getNonNull returns the default value for null values as well | |
| * just make sure to require this file on your main js/ts file | |
| * | |
| * Example: | |
| * var foo = { bar: undefined: bar1: null } | |
| * with _.get: |
| // Written by Samer Murad | |
| const path = require('path'); | |
| const fs = require('fs'); | |
| const os = require('os'); | |
| class TmpCache { | |
| constructor(ID) { | |
| this.FILE_ID = ID; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title> Test Progress</title> | |
| </head> | |
| <style type="text/css"> | |
| .progress { | |
| position: relative; | |
| display: flex; | |
| height: 100px; |
| const requrest = require('request') | |
| const BOT_TOKEN = '<YOUR_TOKEN_HERE>' | |
| const CHAT_ID = 0 // <YOUR_CHAT_ID> | |
| const tmMsg = (text) => { | |
| const options = { | |
| method: 'POST', | |
| url: `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ chat_id: CHAT_ID, text }) |
| const crypto = require('crypto'); | |
| const TAG = 'cryptor || ' | |
| /** | |
| * @typedef CryptResult | |
| * @property {string} iv | |
| * @property {string} crypt | |
| */ |