Skip to content

Instantly share code, notes, and snippets.

View shmidt's full-sized avatar

Dima Shmidt shmidt

View GitHub Profile
@pavlobu
pavlobu / index.js
Created January 19, 2024 15:00
Decode Cyrillic metadata in mp3 files fixing gibberish files description saved in windows 1251 encoding | using NodeJS
import mm from 'music-metadata';
import { promises as fs } from 'fs';
import path from 'path';
import iconv from 'iconv-lite';
import NodeID3 from 'node-id3';
// Function to convert from Windows-1251 to UTF-8
function convertFromWin1251(buffer) {
return iconv.decode(buffer, 'win1251');
}
extension StringProtocol {
subscript(_ offset: Int) -> String.Element {
if offset >= 0 {
self[index(startIndex, offsetBy: offset)]
} else {
self[index(endIndex, offsetBy: offset)]
}
}
@shmidt
shmidt / gist:4f120425627088b6eb1faf7997bbd4ba
Created August 3, 2023 19:47
Change to fish shell on Mac
sudo chown $(whoami) /etc/shells
sudo echo $(which fish) >> /etc/shells
chsh -s $(which fish)
@orue
orue / nerd_fonts.sh
Created June 17, 2022 05:24 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font
@insidegui
insidegui / lsremovearchives.sh
Created December 21, 2021 18:28
Remove Xcode app archives from macOS LaunchServices database
#!/bin/bash
# Recursivelly removes all apps from your Xcode archives from the LaunchServices database, preventing them from being used for widgets, launch at login, etc.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f -u $HOME/Library/Developer/Xcode/Archives
@stephen-mw
stephen-mw / install_python38_on_pi.sh
Last active August 22, 2023 03:55
Install python3.8 and make the system default on Raspberry Pi
#!/usr/bin/env bash
set -euo pipefail
# This script downloads, compiles, and installs python3.8 as the system default
export VERSION=3.8.5
apt install -y \
build-essential \
libbz2-dev \
@zobayer1
zobayer1 / fedora_post_install.md
Last active July 31, 2024 20:09
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname

@AFRUITPIE
AFRUITPIE / fish-build-install.sh
Last active August 7, 2024 03:20
Install Fish Shell 3+ on Raspberry Pi
#!/bin/bash
# This is a quick installer
# script I made to build and install the latest version of
# fish on my Raspberry Pi.
#
# Use at your own risk as I have made no effort to make
# this install safe!
set -e
import UIKit
import Combine
protocol DiffableListDataSourceType {
associatedtype SectionIdentifier: Hashable
associatedtype ItemIdentifier: Hashable
func apply(_ snapshot: NSDiffableDataSourceSnapshot<SectionIdentifier, ItemIdentifier>,
animatingDifferences: Bool,
completion: (() -> Void)?)
@alejandrobernardis
alejandrobernardis / .gitconfig
Last active February 10, 2022 06:41
GitConfig
[user]
email = alejandro.bernardis@gmail.com
name = Alejandro M. BERNARDIS
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true