This file contains hidden or 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
export function slideInFromLeft(delay: number) { | |
return { | |
hidden: { x: -100, opacity: 0 }, | |
visible: { | |
x: 0, | |
opacity: 1, | |
transition: { | |
delay: delay, | |
duration: 0.5, | |
}, |
This file contains hidden or 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 bash | |
set -e | |
set -u | |
set -o pipefail | |
readonly URL='https://github.com/aeternity/superhero-wallet' | |
git fetch --tags |
This file contains hidden or 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 soap from 'soap'; | |
import moment from 'moment'; | |
const taxServiceUrl = 'http://hehexd.com/services/1.2/taxservice.asmx?WSDL' | |
export function generateJsonForTaxRate(json) { | |
const EffectiveDate = moment().toISOString(); | |
const { | |
city: City, | |
state: State, | |
addressLineOne: Street1, |
This file contains hidden or 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
# Automatic nginx virtual subdomains with sub-folders or sub-directories | |
# | |
# Since the original source where I found this code is now offline, I have decided to mirror it here. | |
# All credit goes to: http://web.archive.org/web/20150307193208/http://www.messaliberty.com/2010/10/automatic-nginx-virtual-subdomains-with-sub-folders-or-sub-directories | |
# | |
# Description: In my web root directory I wanted create a folder called photos, and another called | |
# music using a sftp program. Without manually going back to the config file or to the shell I like to | |
# be able to access them at photos.nginxdomain.com and music.nginxdomain.com. That is what this config does. | |
# Redirect visitors from http://nginxdomain.com/ to http://www.nginxdomain.com/ |
This file contains hidden or 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.22 <0.6.0; | |
contract Rent { | |
address public landlord; | |
address public renter; | |
uint256 public price = 1 ether; | |
uint256 public lastPaid; | |
uint256 public nextPayment; | |
This file contains hidden or 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
@compiler >= 4 | |
include "Option.aes" | |
payable contract MyContract = | |
record state = | |
{ bottles : map(hash, address) | |
, supplier : address } |
This file contains hidden or 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
@compiler >= 4 | |
contract OracleCheck = | |
record state = { queries : map(int, oracle_query(string, string)) | |
, oracle_service: oracle(string, string) } | |
entrypoint init() : state = | |
{ queries = {}, | |
oracle_service = ok_264qKMuN5A3SQfn5xHvXpXxwWv3fKJWXkuvWkzays6y61afvhi : oracle(string, string) } |
This file contains hidden or 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.22 <0.6.0; | |
contract TodoList { | |
uint256 id = 0; | |
mapping(uint256 => Todo) public todos; | |
struct Todo { | |
string description; | |
bool status; |
This file contains hidden or 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.25; | |
contract Example { | |
constructor() public {} | |
function addressFrom(address _origin, uint _nonce) public pure returns (address) { | |
bytes memory data; | |
if(_nonce == 0x00) data = abi.encodePacked(byte(0xd6), byte(0x94), _origin, byte(0x80)); | |
else if(_nonce <= 0x7f) data = abi.encodePacked(byte(0xd6), byte(0x94), _origin, byte(_nonce)); |
This file contains hidden or 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 { select } from 'redux-saga/effects'; | |
export default function* call(fn, args, value) { | |
const contract = yield select(s => s.contract.contract); | |
const options = { | |
ttl: 55, | |
fee: 1e16, | |
gas: 1e6, | |
gasPrice: 1e9, |
NewerOlder