AES128 uses a 16 byte secret key.
const key = new Uint8Array(16);
crypto.getRandomValues(key);
For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.
You can download Windows 10 or Windows 11 directly from Microsoft.
After plugging the drive to your machine, identify the name of the USB device using diskutil list
, which should return an output like the one below. In my case, the correct disk name is disk2
.
Hi All! | |
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future. | |
Feel free to request any features you'd like to see, and I'll prioritize them accordingly. | |
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it. | |
Here's the link to the repository: https://github.com/Pulimet/ADBugger | |
App Description: | |
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups. |
This is a way to install and set up Nginx, MariaDB and PHP-FPM on Ubuntu 20.04.
NOTE: This has been prepared for ease of use in mind, not security, mostly in development machine. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead.
$ sudo apt update
/** | |
* Cryptography Functions | |
* | |
* Forked from AndiDittrich/AesUtil.js | |
* https://gist.github.com/AndiDittrich/4629e7db04819244e843 | |
*/ | |
import crypto, { CipherGCM, CipherGCMTypes, DecipherGCM } from 'crypto'; | |
import { Password } from './types'; |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
import { config } from "@/app/config"; | |
import { createLogger } from "@/app/observability"; | |
import { useEffect } from "react"; | |
const { appEnv } = config; | |
const logger = createLogger("developer/storybook"); | |
export const useToggleStorybook = () => { | |
const [isStorybookEnabled, setIsStorybookEnabled] = useState(false) |
/out.mp4 |
// Expo SDK40 | |
// expo-blur: ~8.2.2 | |
// expo-haptics: ~8.4.0 | |
// react-native-gesture-handler: ~1.8.0 | |
// react-native-reanimated: ^2.0.0-rc.0 | |
// react-native-safe-area-context: 3.1.9 | |
import React, { useState } from 'react'; | |
import { | |
Image, |
/* | |
Before Septemper 15 2018, Vietnam has phone number start with 09*, 01(2|6|8|9). | |
After that, the phone number can start with 03, 05, 07 or 08. | |
So this function provide a way to validate the input number is a Vietnamese phone number | |
*/ | |
function isVietnamesePhoneNumber(number) { | |
return /(03|05|07|08|09|01[2|6|8|9])+([0-9]{8})\b/.test(number); | |
} |