Mac :: Take a screenshot on your Mac

You can capture the entire screen, a window, or just a portion of the screen. How to take a screenshot on your Mac To take a screenshot, press and hold these three keys together: Shift, Command, and 3. If you see a thumbnail in the corner of your screen, click it to edit the screenshot. Or wait for the screenshot to save to your desktop. How to capture a portion of the screen Press and hold these three keys together: Shift, Command, and 4....

July 18, 2021 · 2 min · bynaki

Node :: Upgrading npm

Is there a quicker way of just updating all the dependencies, including major version changes? So, like npm update but for major version updates as well? Yes, there is a tool called npm-check-updates that will do this. Just run the following command: npx npm-check-updates -u This will update the dependencies to the latest versions (including major version changes) in the package.json file. If we are happy to go ahead with the upgrades we need to run the following command:...

July 18, 2021 · 1 min · bynaki

Git :: Default Branch를 'master'에서 'main'으로 변경

오래된 프로젝트의 기본 branch 이름이 master라면 main으로 변경하자. github 에서 Settings > Branches > Default branch 에서 master 를 main 으로 변경한 후 로컬에서 다음을 실행한다. git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a git int 할때 기본 branch를 main으로 하기 위한 config 설정. $ git config --global init.defaultBranch main

July 17, 2021 · 1 min · bynaki

CSS :: Web Font (@font-face)

웹 폰트 또한 font-family 속성을 사용하지만, @font-face 지시어(directive)라는 CSS 명령어를 사용해서 웹 브라우저에게 해당 서체를 다운로드할 것을 알리면서 사용할 수 있습니다. 웹 폰트를 위해 사용하는 CSS 코드는 매우 간단하며, 두 개의 CSS 명령어만이 필요합니다. @font-face 지시어는 웹 브라우저에게 서체 이름과 다운받을 위치를 알려줍니다. 이 명령어의 동작 방식은 뒤에서 살펴봅니다. font-family 속성의 사용법은 위에서 언급한 일반 폰트의 사용법과 같습니다. 일단 @font-face 를 사용해 브라우저에게 서체를 다운받으라 알린 다음에는, 어느 CSS에서도 일반 폰트와 동일하게 font-family를 통해 사용할 수 있게 됩니다....

July 15, 2021 · 1 min · bynaki

Hammerspoon

hammerspoon은 macOS에서만 돌아가는 자동화 툴이다. Lua를 내장하고 있다. 마음에 든다. What is Hammerspoon? This is a tool for powerful automation of OS X. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine. What gives Hammerspoon its power is a set of extensions that expose specific pieces of system functionality, to the user. With these, you can write Lua scripts to control many aspects of your OS X environment....

July 14, 2021 · 4 min · bynaki