Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# This screenshot uploading script is made for X and requires maim, xdotool, curl, xdg-open, xclip and probably some other stuff.
# Note that this is probably the first 'big' Bash script I have ever written. Feel free to fork it and make it better.
SCREENSHOT_URL="https://example.com/"
SCREENSHOT_KEY="CHANGE THIS"
SCREENSHOT_FILE="temp.png"
SCREENSHOT_OPEN_BROWSER=true

Keybase proof

I hereby claim:

  • I am mrtenz on github.
  • I am mrten (https://keybase.io/mrten) on keybase.
  • I have a public key ASAudzh2WEyvarJsgAw-DPkB8YbyR06F2an0feMQibxLwwo

To claim this, I am signing this object:

// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@Mrtenz
Mrtenz / json-api.ts
Last active July 12, 2018 17:50
Utility functions for interacting with a JSON API in TypeScript
/**
* Generate request data.
* @param {"POST" | "GET" | "DELETE" | "PUT" | "PATCH"} method
* @param body
* @return {{[key: string]: any}}
*/
const generateData = (method: 'POST' | 'GET' | 'DELETE' | 'PUT' | 'PATCH', body?: any): { [key: string]: any } => {
return {
method,
credentials: 'include',
pragma solidity ^0.5.7;
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
pragma solidity ^0.5.7;
interface ERC721 is ERC165 {
function balanceOf(address _owner) external view returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
pragma solidity ^0.5.7;
interface ERC777 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function totalSupply() external view returns (uint256);
function granularity() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function send(address to, uint256 amount, bytes calldata data) external;
pragma solidity ^0.5.7;
interface ERC777TokensRecipient {
function tokensReceived(
address operator,
address from,
address to,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
pragma solidity ^0.5.7;
interface ERC777TokensSender {
function tokensToSend(
address operator,
address from,
address to,
uint256 amount,
bytes calldata userData,
bytes calldata operatorData
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",