Skip to content

Instantly share code, notes, and snippets.

@ozanmuyes
ozanmuyes / openssl.MD
Created July 24, 2019 11:48 — forked from jchandra74/openssl.MD
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@htr3n
htr3n / macos-ramdisk.md
Last active July 18, 2024 08:22
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

Graphical Debugging for Embedded Rust

So, I recently re-discovered gdbgui - a python tool that attaches to a GDB server and provides a graphical frontend in your browser. It turns out, this works really well for Embedded Rust Development! This also works across Windows, Mac, and Linux, which means it should be handy for most embedded devs out there!

I noticed a couple small tweaks that were necessary to get this working for me, and I wanted to share. Here are my suggestions for getting started:

1. Install

Check out their installation instructions. In addition, you will also need:

@falvarez
falvarez / docker-shell.sh
Created January 24, 2018 08:10
Run docker container, mount current working directory and get interactive shell
docker run -ti -v $(pwd):/tmp DOCKER_IMAGE /bin/bash
// Create customFetch function for handling re-authorization
// This customFetch (or any fetch you pass to the link) gets uri and options as arguments. We'll use those when we actually execute a fetch.
const customFetch = (uri, options) => {
// In our application, the refresh token is stored in a redux store
// We create an instance of the state here so we can get the refresh token later in our request
let state = store.getState()
// This reference to the refreshingPromise will let us check later on if we are executing getting the refresh token.
this.refreshingPromise = null;
@diegovgsilva95
diegovgsilva95 / jsdoc.js
Created November 28, 2017 22:52
JSDoc for Timeout object (timers.setInterval / timers.setTimeout, prototype of "this" at callback context) #nodejs
/**
* @typedef {object} Timeout
* @prop {boolean} _called
* @prop {number} _idleTimeout
* @prop {object} _idlePrev
* @prop {object} _idleNext
* @prop {number} _idleStart
* @prop {function} _onTimeout
* @prop {any[]} _timerArgs
* @prop {number} _repeat
@culttm
culttm / axios.refresh_token.js
Created October 5, 2017 18:46
axios interceptors for refresh token
axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
const originalRequest = error.config;
if (error.response.status === 401 && !originalRequest._retry) {
originalRequest._retry = true;
@kareniel
kareniel / neon-demo_echo.md
Last active March 11, 2024 15:25
echo a string in neon (rust & node)

echo a string in neon (rust & node

starting from the hello_world demo:

  1. we are gonna need the to_string method. but items from traits can only be used if the trait is in scope so we need to add Value to our use statement.

use neon::js::JsString;

@jchandra74
jchandra74 / openssl.MD
Last active July 12, 2024 09:58
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")