Skip to content

Instantly share code, notes, and snippets.

use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
/*
Types
*/
#[derive(Clone)]
@fitzgen
fitzgen / cargo-build-hooks-for-wasm.md
Last active November 3, 2019 10:47
Rust and WebAssembly Working Group meeting notes from the 2019 Rust All Hands
Audience WG-wasm + cargo team (+ maybe WG-embedded?)
When TBD (45 minutes)
Where Snow
Meeting Style Discussion and brainstorming

Deliverables

  • Sketch of an eventual ideal we’d like to end up at
  • Sketch of a minimal RFC that is a first step towards that eventual ideal
@cschiewek
cschiewek / x11_docker_mac.md
Last active August 27, 2025 06:46
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
const { publicPath, assetsPath, commonLoaders } = require('./common.config');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
name: 'SSR',
context: path.join(__dirname, '..', 'app'),
entry: './SSR.js',
output: {
path: assetsPath,
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active August 31, 2025 10:55
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@tylermakin
tylermakin / Multipart MIME Email.md
Last active July 18, 2025 06:56
Multipart MIME Email Guide

Multipart MIME Email Guide

This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.

// Example Multipart Email:
From: sender@example.com
To: recipient@example.com
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
@sosedoff
sosedoff / 1_simple.go
Created July 16, 2016 18:45
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@miloharper
miloharper / main.py
Created July 20, 2015 12:21
A simple neural network written in Python.
from numpy import exp, array, random, dot
class NeuralNetwork():
def __init__(self):
# Seed the random number generator, so it generates the same numbers
# every time the program runs.
random.seed(1)
# We model a single neuron, with 3 input connections and 1 output connection.
@soarez
soarez / ca.md
Last active July 27, 2025 23:20
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.