Skip to content

Instantly share code, notes, and snippets.

View notiv-nt's full-sized avatar

Mikhail Novikov notiv-nt

View GitHub Profile
@mgdm
mgdm / nominimise.json
Last active August 5, 2024 13:35
Custom modification for Karabiner to disable the cmd-m minimise shortcut
{
"title": "Prevent unintended command-m minimising",
"rules": [
{
"description": "Disable Cmd+m minimise",
"manipulators": [
{
"type": "basic",
"description": "",
"from": {
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 16, 2025 20:59
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active October 16, 2024 06:21
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@liangfu
liangfu / ffmpeg.md
Created May 24, 2017 04:46 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@LoyEgor
LoyEgor / gulpfile.js
Last active March 13, 2023 17:22
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js
@kerimdzhanov
kerimdzhanov / random.js
Last active February 26, 2025 22:12
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}