Skip to content

Instantly share code, notes, and snippets.

@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@southglory
southglory / google-colab-mujoco-py-setup.py
Created January 8, 2022 19:23 — forked from BuildingAtom/google-colab-mujoco-py-setup.py
MuJoCo 2.1 working in Google Colab for OpenAI gym. Just add this as a code block near the top of your notebook to get MuJoCo setup.
#Include this at the top of your colab code
import os
if not os.path.exists('.mujoco_setup_complete'):
# Get the prereqs
!apt-get -qq update
!apt-get -qq install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libgl1-mesa-dev libglew-dev patchelf
# Get Mujoco
!mkdir ~/.mujoco
!wget -q https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz
!tar -zxf mujoco.tar.gz -C "$HOME/.mujoco"
@tommyv1987
tommyv1987 / network_tunnel_manager.sh
Last active April 25, 2024 09:07
networking tunnel manager for nym gateways
#!/bin/bash
network_device=$(ip route show default | awk '/default/ {print $5}')
tunnel_interface="nymtun0"
if ! dpkg -s iptables-persistent >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y iptables-persistent
else
echo "iptables-persistent is already installed."
@stevdza-san
stevdza-san / RichTextEditor.kt
Created October 14, 2023 14:08
Demo project of a Compose-Rich-Editor library
import android.annotation.SuppressLint
import android.util.Log
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
@shawonis08
shawonis08 / Oracle Attach_BLOCK_Volume_Instance.md
Last active April 25, 2024 09:02
This readme provides a step-by-step guide for attaching an Oracle Block Volume to an instance and creating a partition, file system, and mounting the file system. It also includes instructions for updating the /etc/fstab file to automatically mount the disk when the system boots, rebooting the instance, and checking the file system. The guide al…

Oracle Attach BLOCK Volume to Instance

  • Creating a partition with fdisk
  • Creating an ext3 file system
  • Mounting the file system
  • Updating the /etc/fstab file
  • Rebooting the instance
  • Checking the file system

Preparation

@arkatsy
arkatsy / zustand-internals.jsx
Last active April 25, 2024 09:01
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
### CSS Selectors
```html
1. bytag
h1 {}
2. byId
#id{}
3. byclass
.class{}
@khalidabuhakmeh
khalidabuhakmeh / PlaywrightFixture.cs
Created September 9, 2022 13:54
Playwright tests with XUnit
[CollectionDefinition(nameof(PlaywrightFixture))]
public class SharedPlaywrightCollection : ICollectionFixture<PlaywrightFixture> {}
// ReSharper disable once ClassNeverInstantiated.Global
public class PlaywrightFixture : IAsyncLifetime
{
public async Task InitializeAsync()
{
PlaywrightInstance = await Playwright.CreateAsync();
Browser = await PlaywrightInstance.Chromium.LaunchAsync();
@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
@mavaddat
mavaddat / setPythonRequestsCaBundle.ps1
Last active April 25, 2024 08:56
Setting Python REQUESTS_CA_BUNDLE for Windows using all the available certificates on the machine. Answer to this Stackoverflow question: https://stackoverflow.com/questions/51925384/unable-to-get-local-issuer-certificate-when-using-requests-in-python
#Requires -Version 6.0
# Allocate a temporary directory for receiving the certificates
$tmpCertsDir = New-Item -Path "$env:TEMP" -Name "Certs$(Get-Date -Format FileDateTimeUniversal)" -ItemType Directory -Force
# Collect the certs from the local machine
$certs = Get-ChildItem -Path Cert:\ -Recurse | Where-Object -FilterScript { $_.Thumbprint }
# This will contain the paths to the resulting PEM files
$pemPaths = [string[]]::new($certs.Count)