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
@HenningTimm
HenningTimm / rust_mem_profiling.md
Last active May 4, 2024 03:48
Memory profiling Rust code with heaptrack in 2019
@KalobTaulien
KalobTaulien / INSTALL
Last active August 11, 2023 15:38
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 December 21, 2023 12:01
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,
}
@martinthomson
martinthomson / quic_header.md
Last active September 9, 2023 15:21
QUIC header format proposal

There are two forms of QUIC common header: long and short. Long form packets are used for the initial exchange - until both 1-RTT packet protection can be started AND version negotiation is complete. Short form packets carry the bulk of the data.

This removes a lot of the flexibility that was the source of most of the objections to the current format. Fields are aligned on four octet boundaries. All long-form header variations have the exact same form. The connection ID is in the same place in both short and long form. The long form clearly identifies the role of the sender in the first octet and it identifies the