I hereby claim:
- I am lsenta on github.
- I am lsenta (https://keybase.io/lsenta) on keybase.
- I have a public key ASAxFII1AzQqnwDFRwGLrBlqpWfg777Uc5GBC0SAhfnubgo
To claim this, I am signing this object:
{ | |
... | |
"homepage": "./", | |
... | |
} |
// https://gist.github.com/lsenta/36fa6d913dffa1d3218d212e0067056f#file-electron-js | |
... | |
const isDev = require("electron-is-dev") | |
... | |
function createWindow() { | |
... | |
if (isDev) { | |
// connect to create-react-app dev server |
#!/usr/bin/env bash | |
# fresh-chrome | |
# | |
# Use this script on OS X to launch a new instance of Google Chrome | |
# with its own empty cache, cookies, and user configuration. | |
# | |
# The first time you run this script, it will launch a new Google | |
# Chrome instance with a permanent user-data directory, which you can | |
# customize below. Perform any initial setup you want to keep on every |
const {app, BrowserWindow} = require("electron") | |
const path = require("path") | |
const isDev = require("electron-is-dev") | |
let mainWindow // prevent main windows to be garbage collected | |
function createWindow() { | |
mainWindow = new BrowserWindow({ | |
frame: false, | |
width: 226, |
module.exports = { | |
... | |
newtabHtml: resolveApp('public/newtab.html'), | |
popupHtml: resolveApp('public/popup.html'), | |
newtabJs: resolveApp('src/newtab.js'), | |
popupJs: resolveApp('src/popup.js'), | |
... | |
}; |
pragma solidity ^0.4.0; | |
contract Test { | |
mapping(uint =\> uint) tests; | |
function Test() { | |
} | |
function one_set() { | |
tests[0] = 0; |
'' Solidity Code (solidity.readthedocs.io) | |
struct Voter { | |
uint weight; | |
bool voted; | |
uint8 vote; | |
address delegate; | |
} |
I hereby claim:
To claim this, I am signing this object:
# https://github.com/singulargarden/ouroboros/blob/v0.1/ouroboros/blockchain/__init__.py | |
def add(root_path, proposed_block_hash, payload): | |
""" | |
Make sure we agree on the proposed hash add the block to our chain. | |
Use this when a block comes from an external source. | |
""" | |
new_descr, block = prepare_block(root_path, payload) | |
# Identical to append but we verify the hash! |
# https://github.com/singulargarden/ouroboros/blob/v0.1/ouroboros/blockchain/__init__.py | |
def prepare_block(root_path, payload): | |
# Load the current blockchain state | |
current_descr = load_descr(root_path) | |
# Create the new block attached to the current head of the chain | |
current_block_hash = current_descr.head_hash | |
new_block = make_block(current_block_hash, payload) |