Skip to content

Instantly share code, notes, and snippets.

ackuser /
Created May 12, 2023 07:19 — forked from adrienjoly/
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs


If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
ackuser / paginated.interface.ts
Created May 3, 2023 09:22 — forked from tugascript/paginated.interface.ts
A Generic Paginated Type for GraphQL in NestJS code first approach
View paginated.interface.ts
export interface IEdge<T> {
cursor: string;
node: T;
interface IPageInfo {
endCursor: string;
hasNextPage: boolean;
ackuser / security.conf
Created April 17, 2023 08:15 — forked from ambroisemaupate/security.conf
Nginx CSP example
View security.conf
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# currently suppoorted in IE > 8
ackuser / .block
Created March 17, 2023 10:37 — forked from mbostock/.block
Brush & Zoom
View .block
license: gpl-3.0
ackuser / .block
Created March 6, 2023 16:04 — forked from d3noob/.block
v7 curve interpolation comparison
View .block
license: mit
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
View svg-rounded-rectangle-path.js
* 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 /
Created January 17, 2023 16:34 — forked from rveciana/
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

View Vimium Cheatsheet
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
View login.component.ts
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';
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
View web3.service.ts
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';
providedIn: 'root'