Skip to content

Instantly share code, notes, and snippets.

View shohey1226's full-sized avatar

Shohei Kameda shohey1226

View GitHub Profile
@brunotavares
brunotavares / react-native-double-tap.js
Last active June 4, 2022 17:14
Double tap gesture recognition for React Native.
const DOUBLE_PRESS_DELAY = 300;
// ...
/**
* Double Press recognition
* @param {Event} e
*/
handleImagePress(e) {
const now = new Date().getTime();
@serradura
serradura / firebase_admin.rb
Last active August 22, 2024 02:52
FirebaseAdmin::Auth.verify_id_token | Ruby solution for https://firebase.google.com/docs/auth/admin/verify-id-tokens
# Usage:
# ========
# FirebaseAdmin::Auth.verify_id_token(your_id_token)
#
# The method call follows the same API of the Node.js, JAVA and Python SDKs.
# See https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_the_firebase_admin_sdk
# Dependencies:
# ---------------
# gem 'activesupport'
@bizarre
bizarre / motd.sh
Created August 8, 2021 11:07
colourful random quote on shell login :)
QUOTE="$(curl -s https://api.quotable.io/random)"
CONTENT="$(echo $QUOTE | jq -r ".content")"
AUTHOR="$(echo $QUOTE | jq -r ".author")"
MOTD="$CONTENT\n- $AUTHOR"
echo "$MOTD" | lolcat