Skip to content

Instantly share code, notes, and snippets.

@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)
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active April 25, 2024 08:56
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@mcroach
mcroach / storing-image-assets-in-repo.md
Last active April 25, 2024 08:56
Using an 'assets' branch to store images in your repo

Storing image assets in your repo and referencing in markdown

Create an assets branch and make the initial commit

git checkout --orphan assets
git reset --hard
cp /path/to/cat.png .
git add .
git commit -m 'Added cat picture'
git push -u origin assets
@onatcipli
onatcipli / go_router_example.dart
Last active April 25, 2024 08:56
go_router_example.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
main() {
CustomNavigationHelper.instance;
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
[
"1185030898148724777",
"956131521733984287",
"956097947727179806",
"1185045871478448242",
"932096380879667253",
"956246550152118374",
"928549000431407164",
"976786710836944936",
"956128945227567145",