Skip to content

Instantly share code, notes, and snippets.

View adisney's full-sized avatar

Alex Disney adisney

View GitHub Profile
<%*
const editor = app.workspace.activeLeaf.view.editor;
if(editor.somethingSelected() === true) {
let selectedText = editor.getSelection();
let splitLines = selectedText.split('\n');
let finalOutput = '';
let listItem = false;
let codeBlock = false;
splitLines.forEach(eachLine => {
@VictorTaelin
VictorTaelin / ethereum_delayed_computations.md
Last active April 12, 2018 16:42
Make Ethereum massively scalable today with delayed computations

Make Ethereum massively scalable today with delayed computations

Suppose you're writing a contract which involves a huge amount of participants. As an example, think of an online, blockchain-based Trading-Card Game with tournaments. How would you program a playCard function? You might be thinking of something like this:

function playCard(uint player, uint card){
    ...
    else if (card == PROFESSOR_OAK){
        // shuffles the player's hand on his deck
 shuffleHand(player)
@arantius
arantius / ingress-intel-notify-ui.user.js
Created December 7, 2012 04:45
User script for the Ingress Intel dashboard / notifier
// ==UserScript==
// @name Ingress Intel: Notify UI
// @namespace https://arantius.com/misc/greasemonkey/
// @description Annotate the Ingress Intel Dashboard with links to control the Ingress Notify app.
// @match http://www.ingress.com/intel*
// @version 1
// @grant none
// ==/UserScript==
//const NOTIFY_SERVER = 'http://localhost:8080/'