惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
博客园 - 司徒正美
F
Fortinet All Blogs
D
Docker
aimingoo的专栏
aimingoo的专栏
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
U
Unit 42
The Register - Security
The Register - Security
Martin Fowler
Martin Fowler
IT之家
IT之家
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
T
Tenable Blog
S
Security Affairs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
W
WeLiveSecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
TaoSecurity Blog
TaoSecurity Blog
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
雷峰网
雷峰网
Forbes - Security
Forbes - Security
Recent Announcements
Recent Announcements
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
P
Palo Alto Networks Blog
C
Cybersecurity and Infrastructure Security Agency CISA
S
Schneier on Security
Attack and Defense Labs
Attack and Defense Labs
Latest news
Latest news
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
Last Week in AI
Last Week in AI
Scott Helme
Scott Helme
A
Arctic Wolf
L
LINUX DO - 最新话题
A
About on SuperTechFans
K
Kaspersky official blog
博客园 - Franky

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker Family Ties in Your DNA: Some relatives are closer than others Doctors per capita Two days in Tallinn, Estonia Ship tools as standalone static binaries Made in America Two days in Helsinki, Finland Maintaining an Android app is a lot of work The land of good deals Two days in Oslo, Norway FastAPI vs Flask performance comparison Google Search is losing to Perplexity Two days in Dublin, Ireland Continuous integration ≠ Continuous delivery World's simplest project success heuristic London in 5 days It is hard to recommend Python in production Inflation, IRS, Credit cards, and Vendors Temu and the Chinese approach Things to do in Miami Florida Revenue vs Cost Axis Language learning as an adult The unanchored babies of the green card limbo Price variance in the United States A day in Louisville, Kentucky A surprisingly positive experience with Air India Unhospitable Airports Android: Don't use stale views USA = Union of Sales and Advertisement A day in Nashville, Tennessee Minimize Javascript in your codebase A day in Birmingham, Alabama In defense of ad-supported products Real vs artificial world The science behind Punjabi singers Hiking Mt. Fuji The Indian startup bubble is insane Repairing database on the fly for millions of users Book Summary: One up on Wall Street by Peter Lynch It is hard to recommend Google Cloud At the Prague airport Kyoto in three days Migrating from WordPress to Hugo Book summary: Sick Societies by Robert B. Edgerton Statistical outcomes require statistical games Illegal immigrants to Europe via Cairo Tokyo in three days Mobs are Status Games Writing Script matters as much as the spoken language Sri Lanka in 5 days LLMs: great for business but bad business Book Summary: Safe Haven by Mark Spitznagel Mac shortcut for typing Avagraha symbol On a bus with an asylum seeker Nicaragua in 5 days When to commit Generated code to version control Why I always buy a local SIM in a foreign country Use Makefile for Android Four days in Guadalajara, Mexico Android Navigation: Up vs Back Hotels vs Airbnb vs Hostels Currency issues in Argentina Abstractions should be deep not wide Some data on podcasting Always support compressed response in an API service A day in El Calafate - Patagonia, Argentina Hermetic docker images with Hugging Face machine learning models American Elections The sound of "ch" API services should always have usage Limits Hiking in El Chaltén - trekking capital of Argentina
Mac OS X Primer: GNU/Linux -> Mac for software engineers
Ashish Bhatia · 2013-12-18 · via ashishb.net

This blog post contains a collection of small tips for engineers migrating from GNU/Linux to Mac OS X for software development. Note: In another post, I wrote about why there is a dearth of a good GNU/Linux laptop. Mac is based on Open BSD which is similar to GNU/Linux but there are quite a few major differences from GNU/Linux. My exposure to BSD is limited, so, I won’t even try to draw a comparison here. Following are some things that I learned and have been useful.

Software Packages

The default style of software installation is slightly weird on Mac. Most software comes in the form of a .dmg file (like .msi for Windows). One has to open the dmg and then drag it to the Applications directory. To uninstall, one can just delete the directory. OS X saves software packages in /Applications directory.

Here are some of my favorites,

  1. Finder (installed by default) - Mac version of Gnome Nautilus or Windows Explorer. Tip: Cmd + O - open the file while pressing “enter” edit the filename.
  2. iTerm2 - Terminal app
  3. XQuartz - for running software that requires an X11 windowing system. For example, Wireshark requires it.
  4. Quicksilver - Universal search for Mac. After installing this app, use Cmd + space to trigger it and type anything from filename to application name
  5. Zipeg - Archive viewer
  6. Xcode - Development Tools. IMHO, it is impossible to survive without this. A lot of other packages mentioned further depend on Xcode.
  7. VMWare Fusion - for running GNU/Linux virtual machines. It is not free. There are free alternatives like VirtualBox. Some combine this with Vagrant.
  8. MacVim - For those who just want to use Vim without the terminal. I prefer Vim instead.
  9. MplayerX - for watching offline videos

Unlike apt-get on Ubuntu or yum on Fedora, Mac does not come with a command-line package manager. The solution is to use homebrew. I have tried MacPorts as well and I feel homebrew is more polished. To install homebrew

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Now to install wget, which does not come by default on Mac machines, do

To look around for brew formulas related to GNU coreutils, do

By default, brew can only install command-line GNU/Linux-style tools. To install a Mac app (.dmg packages), one can enable cask via,

1
brew install caskroom/cask/brew-cask

Now, Google Chrome can be installed via,

1
2
$ brew cask install google-chrome
...

I started using brew cask only recently and my setup can be found here. For Python-based packages, one can use easy_install pip. For Ruby-based packages use gem install. Default version of Ruby is old, upgrade using brew. Try rvm if your main job is to do Ruby based software development. For node.js-based packages install npm (brew install npm). I have not done any rigorous C/C++ development on Mac, so, I am not sure about how good it is.

CLI

  1. Bash shipped with Mac is old, better to upgrade to the latest.

    1
    2
    
    $ brew install bash
    ...
  2. pbcopy, pbpaste - interacts with pasteboard, which is Mac’s clipboard.

    1
    2
    3
    
    $ echo "copy this to clipboard" | pbcopy
    $ pbpaste  # Pastes the content of clipboard
    ...
  3. open is the standard command for opening any file (it chooses the relevant application).

  4. defaults is for modifying settings of various apps via the command line, e.g.

    to see a list of all such settings.

  5. Default autocomplete settings for commands in Mac are subpar. My collection of fixes is here.

  6. A lot of other default settings in Mac are not developer-friendly. My .osx file is here, it is based on the legendary .osx files from Mathias. Feel free to read my dotfiles and also for more examples https://dotfiles.github.io/.

Minor Things

  1. Filenames are case-insensitive, by default, on the Mac OS Extended (Journaled) file system.

  2. Right mouse click - Cmd + click

  3. Closing a window does not close the application, Cmd + Q does.

  4. Default key repeat speed is slow for programming. Following is a fix for that (taken from the source)

    1
    2
    
    $ defaults write NSGlobalDomain KeyRepeat -int 0
    ...
  5. Try out two-finger, three-finger, and four-finger swipes on the trackpad. It is pretty amazing.

  6. All credentials (like Wi-Fi passwords, certificates, etc.) are stored in the Keychain app.

    1
    2
    
    $ open -a "Keychain Access"
    ...
  7. To list all the applications installed on the system use (taken from source)

    1
    2
    
    $ system_profiler SPApplicationsDataType -xml
    ...

    (system_profiler in general, is a pretty useful command as well).

Some more reads

  1. https://news.ycombinator.com/item?id=7051091
  2. https://www.infoworld.com/d/applications/top-20-os-x-command-line-secrets-power-users-202466?page=0,0