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 |
# 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 |
// Find missing numbers in the array | |
const numbers = [1, 2, 7, 3, 5, 4, 9] | |
let missing = [] | |
for (var i = 1; i <= Math.max(...numbers); i++) { | |
if (!numbers.includes(i)) { | |
missing.push(i) | |
} | |
} |
/** | |
* Sometimes, an element that you might need to retrieve | |
* is not visible right away. It might be added later on | |
* via an asynchronous action. | |
* | |
* This is where MutationObserver in JS comes in | |
* and here you can learn from example. | |
* | |
* Example will retrieve video element from the web page. | |
*/ |
// I never really understood them, but now I think I got it... | |
let anObject = { | |
name: 'Nenad', | |
age: 25 | |
}; | |
let myArguments = ['Serbia', 'Valjevo', 'in a relationship']; | |
let anFunction = function (country, city, relationshipStatus) { |
const getSiblings = element => { | |
let siblings = [] | |
let sibling = element.parentNode.firstChild | |
while (sibling = sibling.nextSibling) { | |
if (sibling.nodeType === 1 && sibling !== element) { | |
siblings.push(sibling) | |
} | |
} |
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 |
(function ($) { | |
function getParameterByName(name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) return null; | |
if (!results[2]) return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
} |
Don’t be afraid of Terminal on any OS, let me simplify things for you! I’ve been using Terminal a lot lately, yet I remember the time when I was entirely afraid of even typing anything in it...
Whenever I needed something on my Mac, that required Terminal commands, I had a tough time figuring what does it mean, how does it work; especially when it's a very long one. Well, it was worth it, not just copy/pasting the command, seeing it works and continuing with my day.
VISUAL KEY | DESCRIPTIVE KEY |
---|