Skip to content

Instantly share code, notes, and snippets.

View 0xjjpa's full-sized avatar
🔒
Hiding encrypted secrets

Jose Aguinaga 0xjjpa

🔒
Hiding encrypted secrets
View GitHub Profile
// paste in console of any https site to run (e.g. this page)
// sample arguments for registration
// https://fidoalliance.org/specs/fido-u2f-v1.1-id-20160915/fido-u2f-raw-message-formats-v1.1-id-20160915.html#authentication-response-message-success
var createCredentialDefaultArgs = {
publicKey: {
// Relying Party (a.k.a. - Service):
rp: {
name: "Acme"
},
@PaulRBerg
PaulRBerg / prepare-package.ts
Last active July 16, 2021 12:09
Hardhat script for generating npm-ready folders for your contracts and typechain artifacts (with ethers-v5 as the target). Copied from https://github.com/hifi-finance/hifi-protocol/blob/2230a41269097c10183a0d72683345fe3a256f18/scripts/prepare-package.ts
import path from "path";
import fsExtra from "fs-extra";
import hre from "hardhat";
import { Artifact } from "hardhat/types";
const artifactsDir: string = path.join(__dirname, "..", "artifacts");
const contracts: string[] = [
"Admin",
"AdminInterface",
@iansu
iansu / README.md
Last active April 5, 2022 17:21
Using React 17 and the new JSX transform with Create React App 4.0 Alpha

Using React 17 and the new JSX transform with Create React App 4.0 Alpha

Create React App 4.0 is currently in alpha and supports using React 17 and the new JSX transform. To use it, follow these instructions.

Create a new app

Create a new app with npx create-react-app@next --scripts-version=@next --template=cra-template@next my-js-app

Update to React 17

@spacesailor24
spacesailor24 / RBAC.sol
Created May 21, 2019 07:41
Role Bases Access Control
pragma solidity ^0.5.0;
/**
* @title RBAC
* @author Alberto Cuesta Canada
* @notice Implements runtime configurable Role Based Access Control.
*/
contract RBAC {
event RoleCreated(uint256 role);
@PhABC
PhABC / 0x_Tutorial_1.js
Last active October 26, 2017 14:47
0x.js Tutorial on how to create, validate and fill an order
const Web3 = require('web3');
const ZeroEx = require('0x.js').ZeroEx;
const BigNumber = require('bignumber.js');
// Default provider for TestRPC
const provider = new Web3.providers.HttpProvider('http://localhost:8545')
// Instantiate 0x.js instance
const zeroEx = new ZeroEx(provider);
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active April 15, 2024 07:22
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
kbpgp = require 'kbpgp'
{exec, spawnSync} = require('child_process')
###
gpg_gen_cv25519.txt is:
%echo Generating cv25519
Key-Type: eddsa
Key-Curve: Ed25519
Key-Usage: sign

2016年にJavaScriptを学んでどう感じたか

※この記事は"How it feels to learn JavaScript in 2016"著者であるJose Aguinaga氏による、以下のツイートの本文を確認して記事を翻訳しています。
https://twitter.com/jjperezaguinaga/status/784058480613322752?lang=ja
As long as you reference the original article, please feel free to translate/quote “How it feels to learn JavaScript in 2016” in any media.
また、このような素晴らしい記事を書いて頂いたJose Aguinaga氏に感謝致します。 ありがとうございました。

※追記2016_11_23

@Nezteb
Nezteb / Download_Songs.sh
Last active July 23, 2021 15:05
Downloads specified youtube videos as songs given text file.
#!/bin/bash
# Download_Songs.sh
# By Noah Betzen (Nezteb)
#
# Requires youtube-dl: https://rg3.github.io/youtube-dl/
# You can install youtube-dl via most package managers:
# brew install youtube-dl
# apt-get install youtube-dl
#
@bellbind
bellbind / index.html
Last active February 8, 2017 15:37
[browser][WebCrypto] Identicon generator with WebCrypto API
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Simple Identicon Generator</title>
<script src="script.js"></script>
</head>
<body>
Type Your ID: <input id="id" />
<div>