Skip to content

Instantly share code, notes, and snippets.

View dvlden's full-sized avatar
🧨
I am the error that you should catch!

Nenad Novaković dvlden

🧨
I am the error that you should catch!
View GitHub Profile
@dvlden
dvlden / No_DS_Files.sh
Created January 24, 2022 19:30
Disable `.DS_Store` file creation on Network & USB
# Disable `.DS_Store` file creation on Network & USB
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Check the current policy
defaults read com.apple.desktopservices
@dvlden
dvlden / ffmpeg.md
Last active April 17, 2024 19:53
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@dvlden
dvlden / extract-cookies.php
Last active May 2, 2024 06:47
Quickly Extract "Netscape HTTP Cookie File" to "JSON" (from ".txt" to ".json" format)
<?php
function extractCookies ($string) {
$cookies = array();
$lines = explode("\n", $string);
// iterate over lines
foreach ($lines as $line) {
// we only care for valid cookie def lines