Skip to content

Instantly share code, notes, and snippets.

View ElliotFriend's full-sized avatar

Elliot Voris ElliotFriend

View GitHub Profile
@Smephite
Smephite / SCVals.md
Last active May 5, 2023 03:39
A Simple Guide to Soroban Types

A Simple Guide to Soroban Types

Note: The following content is a written version of the [XDR spec][xdr-spec]

As of [js-soroban-client v0.1.3][js-client] and [soroban-cli v0.2.1][soroban-tools] it's still really funny to work with custom types required for soroban so I will explain to the best of my knowledge how to build a custom Soroban Type in JSON format (but you should probably ask @tdep...)

Note: many of these types actually have helper functions and can be entered

/*
* u2f-detect
* read hid records looking for a usage page of 0xf1d0 and usage 1
* returns true, to be used for udev-rules to set permissions on hidraw
*
* Copyright (c) 2014 Geoff Hoff http://github.com/ghoff
* includes code from hidraw and based on code from lsusb
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@rjmunro
rjmunro / .gitignore
Created June 21, 2013 13:54
gitignore for cordova cli projects
# Android
platforms/android/assets/www
platforms/android/bin/
platforms/android/gen/
platforms/android/res/xml/config.xml
# iOS
platforms/ios/build/
platforms/ios/CordovaLib/build/
platforms/ios/www