Skip to content

Instantly share code, notes, and snippets.

@andrewslotin
andrewslotin / flac2alac.sh
Last active April 19, 2024 17:39 — forked from vol4ok/gist:2587886
Split .ape and .flac and convert to .m4a (ALAC) or .mp3 on MacOS X
# brew install flac ffmpeg cuetools shntool # ставим нужные пакеты
ffmpeg -i 1.ape 1.flac # конвертируем во flac, так как libmac для APE не ставится на osx
cuebreakpoints 1.cue | shnsplit -o flac 1.flac #нарезаем на треки
cuetag.sh 1.cue split-track*.flac #прописываем тэги (cuetag.sh ставится отдельно отдельно)
# конвертируем в ALAC
for f in split-track*.flac ; do
ffmpeg -i "$f" -acodec alac "${f%.flac}.m4a";
done
@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentación oficial sobre Jest

  1. Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
@kenakingkong
kenakingkong / actiontext.scss
Last active April 19, 2024 17:37
Trix Editor - Stimulus Controller and CSS styles
/* https://medium.com/@makenakong/how-to-add-and-customize-the-trix-editor-for-your-ruby-on-rails-application-c0a5d3082254 */
.trix-button--icon-strike,
.trix-button--icon-link,
.trix-button-group--block-tools,
.trix-button-group--file-tools,
.trix-button-group--history-tools {
display: none;
}
@denguir
denguir / cuda_install.md
Last active April 19, 2024 17:35
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@jbfriedrich
jbfriedrich / nsmb.conf
Last active April 19, 2024 17:34
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
@Orbifold
Orbifold / Forecasting.ipynb
Last active April 19, 2024 17:33
A tutorial notebook on forecasting time series with R.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonsugar
jonsugar / show-tailwind-breakpoint.html
Last active April 19, 2024 17:31
Show current tailwind breakpoint.
<div class="flex items-center m-2 fixed bottom-0 right-0 border border-gray-400 rounded p-2 bg-gray-300 text-pink-600 text-sm">
<svg class="h-6 w-auto inline" viewBox="0 0 80 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="url(#paint0_linear)" fill-rule="evenodd" clip-rule="evenodd" d="M32 16C24.8 16 20.3 19.6 18.5 26.8C21.2 23.2 24.35 21.85 27.95 22.75C30.004 23.2635 31.4721 24.7536 33.0971 26.4031C35.7443 29.0901 38.8081 32.2 45.5 32.2C52.7 32.2 57.2 28.6 59 21.4C56.3 25 53.15 26.35 49.55 25.45C47.496 24.9365 46.0279 23.4464 44.4029 21.7969C41.7557 19.1099 38.6919 16 32 16ZM18.5 32.2C11.3 32.2 6.8 35.8 5 43C7.7 39.4 10.85 38.05 14.45 38.95C16.504 39.4635 17.9721 40.9536 19.5971 42.6031C22.2443 45.2901 25.3081 48.4 32 48.4C39.2 48.4 43.7 44.8 45.5 37.6C42.8 41.2 39.65 42.55 36.05 41.65C33.996 41.1365 32.5279 39.6464 30.9029 37.9969C28.2557 35.3099 25.1919 32.2 18.5 32.2Z"></path>
<defs>
<linearGradient id="paint0_linear" x1="3.5" y1="16" x2="59" y2="48" gradien
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@DevSusu
DevSusu / 1-setup.sh
Last active April 19, 2024 17:29
Setup Apache, LetsEncrypt, Vsftpd for multiple domain, multiple users (Ubuntu 18.04)
# reference
# ubuntu, php
# https://websiteforstudents.com/apache2-with-php-7-1-support-on-ubuntu-18-04-lts-beta-server/
# apache
# https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04
# https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04
# vsftpd
@rdenadai
rdenadai / python_expert_path.md
Last active April 19, 2024 17:28
My take into build a basic structure to dictate how to become a Python Expert ... from basic to specialist ?

Python Expert Path

Beginner

  • Basic syntax
    • Variables types:
      • bool, int, float, str, byte, complex, None
    • Conditionals:
      • if, else, elif, for, while, match
  • Functions: simple use, and known what first class citizen is (concept)