By: john
From: https://thebitcoin.pub/t/learn-blockchain-programming-8-week-course/38749
#!/bin/bash | |
# Requirements: | |
# - homebrew: https://brew.sh/ | |
# - homebrew tap: buo/cask-upgrade - https://github.com/buo/homebrew-cask-upgrade | |
# - homebrew mas (Mac App Store command-line interface - https://github.com/mas-cli/mas) | |
# Update, upgrade all and cleanup | |
brew update && brew upgrade && brew cu --all --yes --cleanup && mas upgrade && brew cleanup | |
# Dump all taps, apps, casks and mac apps into ~/Brewfile |
-- This code comes from https://gist.github.com/oliveratgithub/ | |
-- Open in AppleScript Editor and save as Application | |
-- ------------------------------------------------------------ | |
--this is required to break the filename into pieces (separate name and extension) | |
set text item delimiters to "." | |
tell application "Finder" | |
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list | |
display dialog "New file name:" default answer "" | |
set new_name to text returned of result | |
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file. |
-- This script is from [iTerm2 - Alfred Support](https://www.iterm2.com/version3.html). I made some corrections. | |
on write_to_file(this_data, target_file, append_data) | |
try | |
set the target_file to the target_file as string | |
set the open_target_file to open for access file target_file with write permission | |
if append_data is false then set eof of the open_target_file to 0 | |
write this_data to the open_target_file starting at eof | |
close access the open_target_file | |
return true |
\sclass="[a-zA-Z0-9:;\.\s\(\)\-\,]*" | |
Will match with the space before `class`: | |
hallo class="Guten" Tag | |
hallo class="Morgen"> |
[General] | |
# warning, notify, info, verbose | |
loglevel = notify | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10 | |
dns-server = 114.114.114.114,119.29.29.29,8.8.8.8 | |
[Proxy] | |
# http, https, socks5 | |
# Shadowsocks 代理设置(TFO 需要服务器端程序及内核支持) |
-- Preview the currently active iA Writer document using Marked. | |
tell application "iA Writer" | |
activate | |
-- Ask iA Writer for it's active document. | |
set the_document to document 1 | |
-- Save the document or prompt if not previously saved. | |
save the_document | |
Omnifocus 2.X Pro
Perspective icons designed specifically for OmniFocus 2 for Mac and iOS