Skip to content

Instantly share code, notes, and snippets.

View higarin's full-sized avatar

Daisuke Higashi higarin

  • Tokyo, Japan
View GitHub Profile
static byte[] voo(TProtocolFactory factory, byte[] serverResponse) throws TException {
TProtocol inputProtocol = factory.getProtocol(new TMemoryInputTransport(serverResponse));
// Setup output buffer
TMemoryBuffer outBuffer = new TMemoryBuffer(16);
TProtocol outputProtocol = factory.getProtocol(outBuffer);
// Start
TMessage message = inputProtocol.readMessageBegin();
outputProtocol.writeMessageBegin(message);
pragma solidity ^0.4.24;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
pragma solidity ^0.4.13;
contract Ownable {
address public owner;
constructor (address _address) public {
owner = _address;
}
modifier isOwner {
@higarin
higarin / tmux.rst
Last active July 31, 2018 11:40
CheatSheet

tmux

$ tmux ls Show all sessions
Prefix + d Detach from session
$ find ./ -type f -print | xargs grep 'hoge'
* [Quiver](http://happenapps.com/)
* [Ulysses](https://ulyssesapp.com/)
* [Boostnote](https://boostnote.io/)
sudo apt-get install python3-pip
pip3 install docopt gmusicapi-wrapper
wget https://raw.githubusercontent.com/thebigmunch/gmusicapi-scripts/master/gmusicapi_scripts/gmupload.py
sudo mv gmupload.py /usr/bin/gmupload
sudo chmod +x /usr/bin/gmupload
@higarin
higarin / ethtool.md
Created May 1, 2018 01:20
Rock64 ethernet problems
@higarin
higarin / sshd.md
Last active April 28, 2018 09:33
install arch

Disable password

  • Before
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no