sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write com.apple.LaunchServices LSQuarantine -bool false
# disable disk iamge verification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var title = document.getElementById("ebooksProductTitle"); | |
if (title == null) { | |
title = document.getElementById("productTitle") | |
}; | |
title = title.innerText; | |
var imageUrl = document.getElementById("ebooksImgBlkFront"); | |
if (imageUrl == null) { | |
imageUrl = document.getElementById("imgBlkFront") | |
}; | |
imageUrl = imageUrl.src; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a pids | |
for i in {1..10} | |
do | |
toptask=$(ps -eo pcpu=,pid= | sed 's/^ *//' | tr -s ' ' '\t' | sort -grk1 | head -1) | |
cpu=$(echo $toptask | tr -s ' ' '\t' | cut -f1 | cut -d. -f1) | |
pid=$(echo $toptask | tr -s ' ' '\t' | cut -f2) | |
if (( cpu > 100 )); then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upgrade / Update outdated casks installed. | |
# -------------------------------------------------------------------------------- | |
# Looks for outdated casks and installs the the latest version. | |
# User data (like application preferences) is intact. | |
# Updated one liner (thanks Henrik242) | |
# -------------------------------------------------------------------------------- | |
brew upgrade $(brew outdated --cask --greedy --quiet) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1.0: | |
javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bv.playbackRate%20%3D%201%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() | |
//+0.1: | |
javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bvar%20pb%20%3D%20v.playbackRate%20%2B%20.1%3Bpb%20%3D%20pb.toFixed(1)%3Bv.playbackRate%20%3D%20pb%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() | |
//-0.1: | |
javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bvar%20pb%20%3D%20v.playbackRate%20-%20.1%3Bpb%20%3D%20pb.toFixed(1)%3Bv.playbackRate%20%3D%20pb%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Complete macOS Setup | |
# From clean install to fully configured. | |
# Step 1: Init Environment | |
#Temporarily Disable sudo Password Timeout | |
#The sudo password timeout is re-enabled at the end of this script. ##+BEGIN_SRC sh sudo tee /etc/sudoers.d/timeout > /dev/null <<-EOF Defaults timestamp_timeout=-1 EOF ##+END_SRC | |
##+BEGIN_SRC sh sudo tee /etc/sudoers.d/installer > /dev/null <<-EOF %admin ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/installer EOF ##+END_SRC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if we have vscode installed... | |
if hash code 2>/dev/null; then | |
# VSCode as default editor | |
export EDITOR="code -w" | |
# VSCode command line currently does not support piping from stdin | |
# This helper function wraps the `code` command to capture piped stdin | |
function code() { | |
# reference to the original `code` command | |
local code=$(which code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- OUTPUT A LIST OF UNCOMPLETED REMINDERS AND THEIR NOTES IN TASKPAPER FORMAT | |
tell application "Reminders" | |
set myList to "inbox" | |
if (count of (reminders in list myList whose completed is false)) > 0 then | |
set todoListNames to name of reminders in list myList whose completed is false | |
set todoListNotes to body of reminders in list myList whose completed is false | |
set output to "" | |
repeat with itemNum from 1 to (count of todoListNames) | |
set output to output & "- " & (item itemNum of todoListNames) & return | |
if item itemNum of todoListNotes exists then |
…sleeping, meditating, yoga, after hour…. Mostly ambient, drone, (neo-)classical, dub, minimal techno, deep house, micro house, downtempo, slo-mo house, ketapop, schneckno, jetlagdisco, post-rock, lowfi hip hop…
Please feel free to comment your recommendations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display dialog "Name your note..." default answer "" | |
set theName to text returned of result | |
tell application id "DNtp" | |
set theID to "F76B0AC1-6B7B-45A2-ADE6-8514F54671F4" | |
set theGroup to get record with uuid theID | |
set theRecord to create record with {name:theName, type:markdown, content:"# " & theName} in theGroup | |
set theFile to path of theRecord as POSIX file | |
tell application "Finder" to open theFile | |
end tell |