Skip to content

Instantly share code, notes, and snippets.

View S0c5's full-sized avatar
⛓️
joinbloque

David barinas S0c5

⛓️
joinbloque
View GitHub Profile
function base642ab(base64) {
const str = window.atob(base64);
const len = str.length;
const bytes = new Uint8Array(len);
for (let i = 0; i < len; i++) {
bytes[i] = str.charCodeAt(i);
}
return bytes.buffer;
}
@islishude
islishude / build_sign_polkadot_rawtx.ts
Last active February 20, 2024 11:55
Polkadot transfer transaction build and sign(with SDK @polkadot/api@4.6.1 & Polkadot Node v0.8.30)
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";
import { expandMetadata } from "@polkadot/metadata";
import { stringCamelCase, u8aToHex } from "@polkadot/util";
import {
blake2AsHex,
cryptoWaitReady,
encodeAddress,
} from "@polkadot/util-crypto";
import type { SignerPayloadJSON, AnyJson } from "@polkadot/types/types";
@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@daniellizik
daniellizik / path-generator.js
Last active May 18, 2022 03:03
Generate browser query selector string from a given dom element
'use strict';
(() => {
class QuerySelector {
constructor(origin) {
/**
* :nth-of-type is only ie9+ https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type
@tranzium
tranzium / autoview-syntax.txt
Last active November 13, 2023 19:33
TradingView can now become automated trading.
---------- Usage
The syntax created by these parameters is placed in an alert's description on TradingView
to be utilized by Autoview, a Chrome Extension.
Autoview: https://chrome.google.com/webstore/detail/autoview/okdhadoplaoehmeldlpakhpekjcpljmb
> Website: https://autoview.with.pink
> Help: https://use.autoview.with.pink
> Discord: https://discordapp.com/invite/BFz8VPn
TradingView: https://tradingview.go2cloud.org/aff_c?offer_id=2&aff_id=1187
@JasonGhent
JasonGhent / pi_qemu.sh
Last active March 24, 2024 14:36
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version