Skip to content

Instantly share code, notes, and snippets.

View rmanzoku's full-sized avatar

Ryo Manzoku rmanzoku

View GitHub Profile
@rmanzoku
rmanzoku / rds_dynamodb_test.go
Last active May 12, 2020 23:28
RDS vs DynamoDB
package main
import (
"database/sql"
"os"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
contract Untitled {
function compare(string memory _a, string memory _b) public pure returns (bool) {
return (keccak256(abi.encodePacked(_a)) == keccak256(abi.encodePacked(_b)));
}
function cut(string memory _s, uint256 _from, uint256 _range) public pure returns (string memory) {
@rmanzoku
rmanzoku / DJT-coding-test-backend.md
Last active August 20, 2019 02:22
DJT-coding-test-backend

Submit below tasks by your GitHub.

  1. Deploy ERC-721 contract to Ropsten network. You can google it.

  2. Develop Golang web server that can get Ethreum Owner by ERC-721 address and ID. You can use any web framework.

http://example.com/owner/0x273f7F8E6489682Df756151F5525576E322d51A3/50010001
{ "owner": "0xd868711BD9a2C6F1548F5f4737f71DA67d821090" }
package main
import (
"flag"
"fmt"
"math/big"
"strings"
"errors"
)
const WalletProvider = require("truffle-wallet-provider");
const LoomTruffleProvider = require('loom-truffle-provider');
const infuraAPIKey = process.env.INFURA_API_KEY;
const privateKey = Buffer.from(process.env.PRIVATE_KEY, 'hex');
const wallet = require('ethereumjs-wallet').fromPrivateKey(privateKey);
const mainnetProvider = new WalletProvider(wallet, `https://mainnet.infura.io/v3/${infuraAPIKey}`);
const rinkebyProvider = new WalletProvider(wallet, `https://rinkeby.infura.io/v3/${infuraAPIKey}`);
We couldn’t find that file to show.
@rmanzoku
rmanzoku / puma_readme_ja.md
Last active March 24, 2021 09:50
Puma readme

Puma ドキュメント

2017/05/16 v3.8.2 READMEの翻訳。

Description

Pumaは、シンプルで、速くて、マルチスレッド、そして高い並列性を持ったRuby/RackアプリケーションのHTTP1.1サーバです。 Pumaは、開発とプロダクション環境どちらにも使えます。 ベストなスループットを得るために、スレッド実装のあるRubiniusもしくはJRubyの使用を強く勧めます。

Built For Speed & Concurrency

@rmanzoku
rmanzoku / fetch_cert.sh
Last active March 8, 2017 08:41
ElasticBeanstalkについている証明書の一覧を表示する
#!/bin/sh
echo $1
VAR1=`echo ${1} | cut -d ',' -f 1`
VAR2=`echo ${1} | cut -d ',' -f 2`
aws elasticbeanstalk describe-configuration-settings --application-name $VAR1 --environment-name $VAR2 | jq '.ConfigurationSettings[].OptionSettings[] | select(.OptionName == "SSLCertificateId")' | grep -e "acm" -e "iam"