I hereby claim:
- I am dvcrn on github.
- I am dvcrn (https://keybase.io/dvcrn) on keybase.
- I have a public key ASD90ukgjRDay6u9VaMUG_WeXf4xhzUAhUVgaG7Di83jzwo
To claim this, I am signing this object:
package main | |
import ( | |
"context" | |
"encoding/json" | |
"time" | |
"github.com/ReneKroon/ttlcache/v2" | |
"github.com/dvcrn/amqpdedup/internal/amqp" | |
"github.com/dvcrn/amqpdedup/internal/domain" |
import * as metaplex from "@metaplex/js"; | |
import * as web3 from "@solana/web3.js"; | |
const connection = new web3.Connection( | |
web3.clusterApiUrl("mainnet-beta"), | |
"confirmed" | |
); | |
const tokenAddress = "CxkKDaBvtHqg8aHBVY8E4YYBsCfJkJVsTAEdTo5k4SEw"; |
// EDIT: It's now much easier to get metadata from metaplex using the js package. | |
// Check the new gist here: https://gist.github.com/dvcrn/a1b0ff0a0b4b3ab02aff44bc84ac4522 | |
// I didn't want to edit this gist because a lot of people found it helpful to see how to manually decode a account | |
import * as web3 from "@solana/web3.js"; | |
import * as metadata from "./metadata"; // see metadata.ts | |
const tokenAddress = new web3.PublicKey( | |
"CxkKDaBvtHqg8aHBVY8E4YYBsCfJkJVsTAEdTo5k4SEw" | |
); |
# example to fetch the current MONA price in JPY | |
# needs http://www.mousedown.net/mouseware/JSONHelper.html | |
# replace 'neo' with any other ID supported by coinmarketcap | |
# using coinmarketcaps convert API to add `price_jpy` to the result | |
set json_data to (do shell script "curl https://api.coinmarketcap.com/v1/ticker/monacoin/?convert=JPY") | |
tell application "JSON Helper" | |
set json_data to read JSON from json_data | |
end tell |
(def Realm (js/require "realm")) | |
;; define dog schema | |
(def dog {:name "Dog" | |
:properties {:name "string" | |
:age "int"}}) | |
;; instantiate Realm with the dog schema | |
(def r (Realm. (clj->js {:schema [dog]}))) |
I hereby claim:
To claim this, I am signing this object:
;; very simple example on how to use Animated with reagent | |
;; https://facebook.github.io/react-native/docs/animations.html | |
(def animated (.-Animated js/React)) | |
(def animated-value (.-Value animated)) | |
(def animated-view (r/adapt-react-class (.-View animated))) | |
(defn testview [] | |
(r/create-class |
testset = [ | |
[1, 4], | |
[2, 8], | |
[3, 12], | |
[4, 16] | |
] | |
theta0 = 0 | |
theta1 = 0 | |
learningrate = 0.01 |
emacs () { | |
PROCESS=Emacs | |
number=$(ps aux | grep $PROCESS | wc -l) | |
if [ $number -gt 1 ] | |
then | |
emacsclient -c -n $1 | |
else | |
open -a /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.8/Emacs.app $1 | |
fi |