Skip to content

Instantly share code, notes, and snippets.

View samizdat-shell-help.bash
### my-script — does one thing well
### Usage:
### my-script <input> <output>
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
calebsander / base64.wast
Created Jul 17, 2018
base-64 encode and decode in WASM
View base64.wast
;; Memory layout
;; 0 - 63: lookup
;; 64 - 186: revLookup
;; 187 - : input, followed by output
(global $INPUT (export "INPUT") i32 (i32.const 187))
(memory (export "memory") 1)
(data (i32.const 0) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
(func (export "init")
(local $i i32)
axic /
Last active Apr 24, 2020
ewasm “WRC20” token contract coding challenge

ewasm “WRC20” token contract coding challenge

This document describes a simple contract in pseudocode and gives a couple of test cases for it.

The challenge is designed to be fairly easy to implement in a language of choice, compiled to wasm and interacted with. It is loosely based on the ERC20 token standard, named "WRC20", where the W stands for WebAssembly.

External interface

The contract has two features:

View rc5.wast
(global $gasUsed (mut i64) (i64.const 0))
(func $useGas (param $gas i64)
get_global $gasUsed
get_local $gas
set_global $gasUsed
(global $cb_dest (mut i32) (i32.const 0))
tilkinsc / load_dds.c
Last active Nov 6, 2020
C OpenGL DDS Loading Tutorial
View load_dds.c
Can load easier and more indepth with
Because a lot of crappy, weird DDS file loader files were found online. The resources are actually VERY VERY limited.
Written in C, can very easily port to C++ through casting mallocs (ensure your imports are correct), goto can be replaced.
^ Two examples of terrible code
reborg /
Last active Nov 23, 2020
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content


Uninstall brew package and dependencies

Remove package's dependencies (does not remove package):

brew deps [FORMULA] | xargs brew remove --ignore-dependencies

Remove package:

View script.cpp
Script::Script() {
Script::~Script() {
void Script::Initialize(char* src) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
View scriptsystem.cpp
#include <eternity.hpp>
ScriptSystem::ScriptSystem() {
m_platform = 0;
m_isolate = 0;
m_scriptableCount = 0;
m_scriptablePoolSize = 0;
m_scriptables = 0;
frekele / Jenkinsfile
Created Aug 4, 2016
Jenkinsfile pipelineTriggers - TimerTrigger periodic run the script.
View Jenkinsfile
MAIL_TO = ''
GITHUB_USER_NAME = 'my-github-user'
You can’t perform that action at this time.