Skip to content

Instantly share code, notes, and snippets.

#!/bin/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.
@charles-rumley
charles-rumley / 1password-vpn-login.sh
Created May 28, 2019 21:58
Use stored 1Password credentials to authenticate a Cisco AnyConnect VPN client
#!/usr/bin/env bash
# Prerequisites
#
# Download the 1Password CLI tool
#
# brew cask install 1password-cli
#
# Before using this script, you'll need to authenticate the 1Password
# CLI for the first time. Use the following command, replacing
@calebsander
calebsander / base64.wast
Created July 17, 2018 23:16
base-64 encode and decode in WASM
(module
;; 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
axic / README.md
Last active December 15, 2021 03:14
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:

(module
(global $gasUsed (mut i64) (i64.const 0))
(func $useGas (param $gas i64)
get_global $gasUsed
get_local $gas
i64.add
set_global $gasUsed
)
(global $cb_dest (mut i32) (i32.const 0))
@tilkinsc
tilkinsc / load_dds.c
Last active March 23, 2024 17:20
C OpenGL DDS Loading Tutorial
/*
Can load easier and more indepth with https://github.com/Hydroque/DDSLoader
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.
https://www.gamedev.net/forums/topic/637377-loading-dds-textures-in-opengl-black-texture-showing/
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/
^ Two examples of terrible code
@reborg
reborg / rich-already-answered-that.md
Last active May 8, 2024 14:20
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:

Script::Script() {
}
Script::~Script() {
}
void Script::Initialize(char* src) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
#include <eternity.hpp>
ScriptSystem::ScriptSystem() {
m_platform = 0;
m_isolate = 0;
m_scriptableCount = 0;
m_scriptablePoolSize = 0;
m_scriptables = 0;
}