Skip to content

Instantly share code, notes, and snippets.

View cryptoquick's full-sized avatar
🦀
Any application that can be written in Rust, will eventually be written in Rust.

Hunter Beast cryptoquick

🦀
Any application that can be written in Rust, will eventually be written in Rust.
View GitHub Profile
@max-mapper
max-mapper / index.js
Created May 17, 2019 18:30
secp256k1 encrypt/decrypt with bip32 keys
var KeyEncoder = require('key-encoder')
var VirgilCrypto = require('virgil-crypto').VirgilCrypto
var HDKey = require('hdkey')
const secp256k1 = require('secp256k1')
var keyEncoder = new KeyEncoder('secp256k1')
var hdKey = HDKey.fromMasterSeed(Buffer.from(SEED, 'hex'))
var childKey = hdKey.derive(PATH)
@HenningTimm
HenningTimm / rust_mem_profiling.md
Last active February 17, 2025 03:46
Memory profiling Rust code with heaptrack in 2019
@KalobTaulien
KalobTaulien / INSTALL
Last active November 21, 2024 09:26
Force lowercase paths using NGINX. Does not affect query params.
# On Ubuntu run `sudo apt-get install nginx-extras` for perl scripts to run
# `sudo service nginx restart` (verify it restarted properly)
# Add nginx.conf perl function; add yoursite.conf location
@mariodian
mariodian / btcpayserver.service
Last active October 12, 2022 11:27
BTCPayServer Systemd Service
[Unit]
Description=BtcPayServer daemon
Requires=btcpayserver.service
After=nbxplorer.service
[Service]
ExecStart=/usr/bin/dotnet run --no-launch-profile --no-build -c Release -p "/home/satoshi/source/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- $@
User=satoshi
Group=satoshi
Type=simple
@mariodian
mariodian / nbxplorer.service
Created November 8, 2018 05:17
NBXplorer Systemd Service
[Unit]
Description=NBXplorer daemon
Requires=bitcoind.service
After=bitcoind.service
[Service]
ExecStart=/usr/bin/dotnet "/home/satoshi/source/NBXplorer/NBXplorer/bin/Release/netcoreapp2.1/NBXplorer.dll" -c /home/satoshi/.nbxplorer/Main/settings.config
User=satoshi
Group=satoshi
Type=simple
@MattiasBuelens
MattiasBuelens / streams.ts
Created June 27, 2018 18:55
Workaround for WHATWG streams in TypeScript
import {
ReadableStream as WhatWGReadableStream,
TransformStream as WhatWGTransformStream,
WritableStream as WhatWGWritableStream
} from 'whatwg-streams';
export type ReadableStream<R> = WhatWGReadableStream<R>;
export const ReadableStream: typeof WhatWGReadableStream = (self as any).ReadableStream;
export type WritableStream<W> = WhatWGWritableStream<W>;
@clivetyphon
clivetyphon / meraki-client-vpn-linux.md
Created June 15, 2017 09:09
Configuring Meraki Client VPN in Linux

Configuring Meraki Client VPN in Linux

You can try the official Meraki Configuring Client VPN in Linux article for GUI based setup. For terminal based configuration, see below.

Install packages

Install the following packages:

  • strongswan
  • xl2tpd
@rambabusaravanan
rambabusaravanan / apache.conf
Last active January 24, 2025 02:18
SPA - Apache, Nginx Configuration for Single Page Application like React.js on a custom path
# To host on root path just use "<Location />" for http://mydomainname.in
# To host on non-root path use "<Location /myreactapp>" for http://mydomainname.in/mypath
# If non-root path, don't forgot to add "homepage": "/myreactapp" in your app's package.json
<VirtualHost *:80>
ServerName mydomainname.in
DirectoryIndex index.html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@jtanx
jtanx / keybindings.json
Created April 23, 2017 09:33
Visual Studio Code disable MRU tab switching
[
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
}
]
@wmertens
wmertens / router.jsx
Last active August 10, 2017 11:14
Wrapper for react-router v4 with an API more to my tastes
import React, {Component, PropTypes} from 'react'
import {Link, Route as OrigRoute, Switch, Redirect, BrowserRouter as Router, withRouter} from 'react-router-dom'
// Subscribes a child to history updates, passing the current location as a prop
// This is needed to work around the React context API not updating all children
// See https://github.com/ReactTraining/react-router/issues/4629#issuecomment-284218493
export class LocationListener extends Component {
static contextTypes = {
history: PropTypes.object,
}