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
# Single input, multiple converted outputs | |
trigger: | |
name: balance | |
params: | |
condition: '> 10' | |
action: | |
name: swap | |
params: | |
outputs: | |
- symbol: TUSD # required: any asset supported by our exchanges or inputs |
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
swap(6000, BLOCK, BTC, 'account1') | |
duration(1 day) | |
limit(4.15) |
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
if balance(DASH) > 15 | |
swap(70%, TUSD, 'account1') limit(154.30) | |
swap(25%, GUSD, 'account2') limit(155.20) | |
send(5%, 'savings') |
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
if balance(BLOCK, BajWThUb9svYuPeQ5AzBni2aiyPxazhf31) > 15 |
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
pragma solidity ^0.4.11; | |
// This contract keeps all Ether sent to it with no way to get it back. | |
contract Pain { | |
function() payable {} | |
} | |
// So does this one | |
contract MorePain { | |
function payme() payable {} |
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
$ go get github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen | |
$ ipfs-swarm-key-gen > ~/.ipfs/swarm.key |
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 "fmt" | |
type Cat struct { | |
name string | |
skill string | |
} | |
func main() { |
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
// The dumb way to deal with SOAP requests | |
func userRequest(userId string) string { | |
template := soapify(userTemplate) | |
return fmt.Sprintf(template, userId) | |
} | |
func soapify(template string) string { | |
return fmt.Sprintf(soapTemplate, template) | |
} |
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
{ | |
"actions":[ | |
{ | |
"add":{ | |
"index":"%s", | |
"alias":"%s", | |
"filter":[ | |
{ | |
"term":{ | |
"meta.publish_records.timestamp":"%s" |
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
# Thanks https://coderwall.com/p/khym-w | |
curl -s "http://someapi.com/json" | ruby -rawesome_print -rjson -e 'ap JSON.parse(STDIN.read)' |