Skip to content

Instantly share code, notes, and snippets.

@ackuser
ackuser / .block
Created March 17, 2023 10:37 — forked from mbostock/.block
Brush & Zoom
license: gpl-3.0
redirect: https://observablehq.com/@d3/focus-context
@ackuser
ackuser / .block
Created March 6, 2023 16:04 — forked from d3noob/.block
v7 curve interpolation comparison
license: mit
@ackuser
ackuser / svg-rounded-rectangle-path.js
Created March 3, 2023 05:24 — forked from danielpquinn/svg-rounded-rectangle-path.js
Draw SVG Rounded Rectangle Path
/**
* Get path data for a rounded rectangle. Allows for different radius on each corner.
* @param {Number} w Width of rounded rectangle
* @param {Number} h Height of rounded rectangle
* @param {Number} tlr Top left corner radius
* @param {Number} trr Top right corner radius
* @param {Number} brr Bottom right corner radius
* @param {Number} blr Bottom left corner radius
* @return {String} Rounded rectangle SVG path data
*/
@ackuser
ackuser / README.md
Created January 17, 2023 16:34 — forked from rveciana/README.md
conicConformalSpain example

This file shows how to use the geoConicConformalSpain projection from d3-composite-projections.

To change the file, edit draw.js and run

browserify draw.js| uglifyjs > bundle.js

The dependencies are installed with:

npm install d3-composite-projections d3-geo d3-request d3-selection d3-transition topojson

h scroll left
j scroll down
k scroll up
l scroll right
gg scroll to top of the page
G scroll to bottom of the page
f activate link hints mode to open in current tab
F activate link hints mode to open in new tab
r reload
import { Component, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
import { Observable, withLatestFrom } from 'rxjs';
import { Web3Service } from '../web3.service';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
import { Injectable } from '@angular/core';
import { hdkey } from "ethereumjs-wallet";
import * as bip39 from "bip39";
import Web3 from 'web3'
import * as Mnemonic from "bitcore-mnemonic";
import * as CryptoJS from "crypto-js";
import { of } from 'rxjs';
@Injectable({
providedIn: 'root'
<!-- Form Login -->
<form *ngIf="!wallet?.address" [formGroup]="loginForm">
<textarea
*ngIf="!hasSeeds"
type="text"
class="form-control"
formControlName="seeds"
placeholder="Seeds"
rows="4"
></textarea>
@ackuser
ackuser / init
Created June 22, 2022 07:10
My nvim config
set scrolloff=8
set number
" set relativenumber
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set showcmd
set notermguicolors
call plug#begin('~/.vim/plugged')
@ackuser
ackuser / Messagebox.sol
Created June 8, 2022 10:05
ArrayRemovingElementByReplacingLast
//SPDX-License-Identifier:UNLICENSED
pragma solidity ^0.8.7;
contract Messagebox {
string[] public messages;
uint public lastDate;
address public owner;