Skip to content

Instantly share code, notes, and snippets.

View jedsada-gh's full-sized avatar
😄
undefined

Jedsada Tiwongvorakul jedsada-gh

😄
undefined
View GitHub Profile
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active April 17, 2024 06:38
PHP API To get Direct Link of YouTube videos
const bip39 = require("bip39");
const bip32 = require("ripple-bip32");
const ripple = require('ripple-keypairs')
var mnemonic = 'novel matter final only nice cheese address cradle civil crash great flame struggle consider crowd surface purpose saddle mango endless mixed trial tape wrap'
// Or generate:
// mnemonic = bip39.generateMnemonic()
console.log('mnemonic: ' + mnemonic)
const seed = bip39.mnemonicToSeed(mnemonic) // add second argument for 25th word encrypted
@t1m0thyj
t1m0thyj / main.py
Last active February 4, 2023 09:10
Play music from YouTube in Google Assistant on Raspberry Pi
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@jedsada-gh
jedsada-gh / amazon-rekognition.md
Created December 27, 2017 16:42 — forked from alexcasalboni/amazon-rekognition.md
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search
@WietseWind
WietseWind / transaction.js
Last active May 18, 2020 03:54
Send XRP transaction to Ripple XRP Ledger
/**
* Use: node transaction.js AMOUNT:FROMADDR:TOADDR:TOTAG
* eg: node transaction.js 10:rXXXXXXX:rXXXXXX:1337
* To be able to sign the transaction, the object 'wallets'
* below should contain the secret key for the used from-wallet.
*/
const RippleAPI = require('ripple-lib').RippleAPI
const api = new RippleAPI({ server: 'wss://s1.ripple.com' }) // Public rippled server
const fetch = require('node-fetch')
@k-kagurazaka
k-kagurazaka / DebounceTest.kt
Created December 1, 2017 14:18
RxJava debounce like operator implementation for kotlin coroutine
launch(UI) {
editText.onTextChanged()
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
}
}
}
fun EditText.onTextChanged(): ReceiveChannel<String> =
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active June 29, 2024 15:53
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@marcinlerka
marcinlerka / eu_vat_numbers_regex
Created August 23, 2017 09:40
eu vat numbers regex
'AT': (/^(AT)(U\d{8}$)/i), // Austria
'BE': (/^(BE)(\d{10}$)/i), // Belgium
'BG': (/^(BG)(\d{9,10}$)/i), // Bulgaria
'CY': (/^(CY)([0-5|9]\d{7}[A-Z]$)/i), // Cyprus
'CZ': (/^(CZ)(\d{8,10})?$/i), // Czech Republic
'DE': (/^(DE)([1-9]\d{8}$)/i), // Germany
'DK': (/^(DK)(\d{8}$)/i), // Denmark
'EE': (/^(EE)(10\d{7}$)/i), // Estonia
'EL': (/^(EL)(\d{9}$)/i), // Greece
'ES': (/^(ES)([0-9A-Z][0-9]{7}[0-9A-Z]$)/i), // Spain
@sogoiii
sogoiii / index.html
Created July 18, 2017 21:07
Browser to IPFS example
<!DOCTYPE html>
<html>
<head>
<title>JavaScript file upload</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="https://wzrd.in/standalone/buffer"></script>
<script src="https://unpkg.com/ipfs-api@9.0.0/dist/index.js"
integrity="sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB"
crossorigin="anonymous"></script>
</head>
@learner-long-life
learner-long-life / Rinkeby.md
Last active August 30, 2022 22:32
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,