Skip to content

Instantly share code, notes, and snippets.

@menduz
menduz / dcl-roads.json
Created Mar 14, 2018
Decentraland roads
View dcl-roads.json
["-99,-29","-94,-29","-93,-29","-90,-29","-89,-29","-87,-29","-51,-29","-150,62","-150,61","-150,33","-150,27","-150,0","-150,-20","-50,-29","0,-29","1,-29","15,-29","16,-29","17,-29","18,-29","20,-29","21,-29","-149,-20","22,-29","23,-29","24,-29","25,-29","26,-29","27,-29","28,-29","29,-29","30,-29","33,-29","41,-29","50,-29","51,-29","150,-29","-87,-30","-51,-30","-50,-30","0,-30","1,-30","27,-30","-149,62","-149,61","-149,33","-149,27","-149,0","29,-30","30,-30","31,-30","32,-30","33,-30","34,-30","35,-30","36,-30","37,-30","38,-30","39,-30","40,-30","41,-30","42,-30","43,-30","44,-30","45,-30","46,-30","47,-30","48,-30","49,-30","-148,-70","-148,-74","-148,0","-148,-20","50,-30","51,-30","150,-30","19,-144","20,-144","21,-144","22,-144","72,-144","73,-144","150,-144","-13,-145","0,-145","1,-145","14,-145","-148,62","-148,61","-148,33","-148,27","-148,26","-148,25","-148,24","-147,-70","-87,-31","-51,-31","-50,-31","0,-31","1,-31","20,-31","21,-31","22,-31","23,-31","24,-31","25,-31","26,-31","-147,33","-
View keybase.md

Keybase proof

I hereby claim:

  • I am menduz on github.
  • I am menduz (https://keybase.io/menduz) on keybase.
  • I have a public key ASAaLUmgV8Es9SZ8DahB2-9FgfNOtqGo0hUr_dicrchZoQo

To claim this, I am signing this object:

@menduz
menduz / scene.tsx
Created Jun 27, 2018
animation in dcl
View scene.tsx
// tslint:disable:ter-indent
import { ScriptableScene, createElement } from 'metaverse-api'
export default class SharkAnimation extends ScriptableScene {
state = {
bitestate: 0
}
async sceneDidMount() {
this.eventSubscriber.on(`muhshark_click`, xxx => {
@menduz
menduz / lumen.lua
Created Sep 12, 2018 — forked from anonymous/lumen.lua
Self-hosted Lisp using vvander's Lua browser runtime: https://cdn.rawgit.com/vvanders/wasm_lua/d68f46a8/main.html
View lumen.lua
environment = {{}}
target = "lua"
function nil63(x)
return(x == nil)
end
function is63(x)
return(not nil63(x))
end
function no(x)
return(nil63(x) or x == false)
@menduz
menduz / yubikey-reset.sh
Created May 24, 2019 — forked from pkirkovsky/yubikey-reset.sh
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
View yubikey-reset.sh
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@menduz
menduz / ao-ind-conversor.js
Created Jul 13, 2019
ao-ind-conversor.js
View ao-ind-conversor.js
const bb = require("./bytebuffer");
const fs = require("fs");
function loadBB(src) {
return bb.wrap(fs.readFileSync(src));
}
function loadCabecera(bb) {
bb.skip(255 + 4 + 4);
}
@menduz
menduz / webrtc.ts
Created Jul 14, 2019
WebRTC basic setup
View webrtc.ts
// This configuration is passed when we create a new peer connection object.
// It provides a set of servers used to establish a connection. STUN servers
// are used to discover our external IP address, and TURN servers (none listed
// here) are used to proxy a connection when a peer is behind a restrictive
// firewall that prevents a direct connection.
var peerConnectionConfig = {
iceServers: [
{ urls: "stun:stun.l.google.com:19302" },
{ urls: "stun:stun1.l.google.com:19302" },
{ urls: "stun:stun2.l.google.com:19302" },
@menduz
menduz / NAT.ts
Created Jul 25, 2019
DetectNAT.ts
View NAT.ts
export enum NatType {
Other = 0,
SymmetricNAT = 1,
NoNAT = -1 // No NAT (Open Internet, Blocked, Symmetric UDP Firewall)
}
export async function detectNat(): Promise<NatType> {
const candidates = new Map<number, number[]>();
const pc = new RTCPeerConnection(peerConnectionConfig);
View cloudSettings
{"lastUpload":"2019-08-06T13:27:47.425Z","extensionVersion":"v3.4.1"}
View clojure.ebnf
{ws=explicit}
Document ::= WS* Forms EOF {ws=implicit}
Form ::= (&"(" List | &"[" Vector | &"{" Map| &"#{" Set| &"'" Quote| &"`" Backtick| &"@" Deref| &"~@" UnquoteSplicing| &"~" Unquote| &"#(" Lambda| !';' Symbol| &":" Keyword | Literal | Discard | Dispatch | Regex) {pin=1,fragment=true}
Forms ::= (Form WS* | Comment WS*)* {fragment=true}
List ::= OPEN_PAREN WS* Forms? WS* CLOSE_PAREN {pin=1,recoverUntil=CLOSE_PAREN}
Vector ::= OPEN_ARRAY WS* Forms? WS* CLOSE_ARRAY {pin=1,recoverUntil=CLOSE_ARRAY}
You can’t perform that action at this time.