This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>JavaScript GET Request</title> | |
<style> | |
.featured { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svelte:head> | |
<title>JavaScript GET Request: An Example</title> | |
</svelte:head> | |
<script> | |
import fetch from 'isomorphic-unfetch' | |
import Coding from './_coding.svelte'; | |
const url='https://api.coindesk.com/v1/bpi/currentprice.json' | |
const fetchText = (async () => { | |
const response = await fetch(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "os" | |
import "fmt" | |
import "net/http" | |
import "io/ioutil" | |
func main() { | |
url := "https://fake.zendesk.com/api/v2/satisfaction_ratings?score=good_with_comment" | |
username := "fake@mail.com/token" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, json, yaml, re, os, myfunc | |
from slackclient import SlackClient | |
with open('slack.yaml', 'r') as f: | |
doc = yaml.load(f) | |
user_id=doc["user_id"] | |
user_name=doc["user_name"] | |
user_address=doc["user_address"] | |
print user_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BTC: "229.30" | |
CNY: "0.16" | |
BRL: "0.32" | |
MXN: "0.065" | |
JPY: "0.0081" | |
XRP: "0.0079" | |
EUR: "1.13" | |
KRW: "0.00090" | |
BIT: "0.0025" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocket = require('ws'); | |
var moment= require('moment'); | |
var yaml = require('js-yaml'); | |
var fs = require('fs'); | |
try { | |
var doc = yaml.safeLoad(fs.readFileSync('rates.yml', 'utf8')); | |
yen_value=doc["EUR"]; | |
console.log(yen_value); | |
} catch (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocket = require('ws'); | |
var moment= require('moment'); | |
var ws = new WebSocket('wss://s1.ripple.com:443/'); | |
var bitstamp = "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"; | |
var account = bitstamp; | |
var info_subscribe={ | |
command: "subscribe", | |
accounts: [bitstamp] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'yaml' | |
ripple=YAML.load_file("ripple.yml") | |
server=ripple["server"]["api"] | |
snapswap=ripple["address"]["snapswap"] | |
bitstamp=ripple["address"]["bitstamp"] | |
info="/v1/accounts/#{snapswap}/payments/paths/#{snapswap}/1.0+XRP" | |
endpoint="#{server}#{info}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ripple = require('ripple-lib'); | |
var remote = new ripple.Remote({ | |
servers: [ 'wss://s1.ripple.com:443' ] | |
}); | |
var pathFind = function(responseCallback) { | |
try { | |
var currency = 'USD'; | |
var amount = ripple.Amount.from_human('0.001 USD') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tx_parse=require('ripple-lib-transactionparser'); | |
var json= { | |
success: true, | |
transaction: { | |
TransactionType: "Payment", | |
Flags: 0, | |
Sequence: 99, | |
DestinationTag: 88298231, | |
Amount: { |