Skip to content

Instantly share code, notes, and snippets.

View adamstallard's full-sized avatar

Adam Stallard adamstallard

View GitHub Profile
@adamstallard
adamstallard / OnchainMedianVote.md
Last active September 27, 2023 22:04
Keeping a running median vote on chain
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreigz63l2hwf3x37f27sp3ytordn2syx2ggclm6pt4jqb7rcho3iyfq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/

Keybase proof

I hereby claim:

  • I am adamstallard on github.
  • I am castall (https://keybase.io/castall) on keybase.
  • I have a public key ASCtqtasKKz9kJDOLUgdQeZDqnTPQ46bWseR4fnFpu59Ewo

To claim this, I am signing this object:

Coinsensus

Coinsensus is a token that's regularly minted and distributed according to near-consensus of a voting group with a growing or fluctuating membership.

Others may contribute to the mission of an instance of the token by donating other tokens, including ether.

Holders of the token may receive dividends from the donated tokens.

Particulars

Near-consensus is required among those that vote each round, but there's no requirement of quorum.

@adamstallard
adamstallard / attr-string-template-pre.xhtml
Last active August 26, 2023 10:50
How to reuse part of an attribute string in modest.
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<include>myImage</include>
</head>
<body>
<myImage>
<base>..</base>
</myImage>
</body>
@adamstallard
adamstallard / greetings\hello.xml
Last active December 21, 2015 23:39
Include a module from a different directory with the "path" attribute
<p>Hello, World!</p>
@adamstallard
adamstallard / Grunt.xml
Created August 28, 2013 05:56
Run Configurations for running grunt from the IntelliJ (webstorm) IDE. You need my fork of grunt (which fixes pipe output) to use it.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Grunt" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="C:/Program Files/nodejs/node" path-to-js-file="$USER_HOME$/AppData/Roaming/npm/node_modules/grunt-cli/bin/grunt" application-parameters="--stack" working-dir="$PROJECT_DIR$">
<RunnerSettings RunnerId="NodeJS.debug" />
<RunnerSettings RunnerId="NodeJS.run" />
<ConfigurationWrapper RunnerId="NodeJS.debug" />
<ConfigurationWrapper RunnerId="NodeJS.run" />
<method />
</configuration>
</component>
@adamstallard
adamstallard / include1-pre.xhtml
Last active December 21, 2015 20:29
Include a module (using modest-preview.js to preview).
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="modest-preview.js"></script>
<include>lorem</include>
</head>
<body>
<lorem/>
</body>
@adamstallard
adamstallard / include2-pre.xhtml
Last active December 21, 2015 20:29
Include a module (compiled with modest).
<?xml version='1.0' encoding='UTF-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<include>lorem</include>
</head>
<body>
<lorem/>
</body>
</html>
var testFiles = [];
var files = this.data.files2;
if (grunt.utils._.isString(files)) {
files = [files];
}
else{
files = grunt.utils._.flatten(files);
}