Skip to content

Instantly share code, notes, and snippets.

@cslee
cslee / launchctl-parallels-desktop.md
Last active February 8, 2025 12:43
Run Parallels Desktop on Mac at login and at a specific time

Run Parallels Desktop on Mac at login and at a specific time

Create a job definition

  • Filename: ~/Library/LaunchAgents/com.parallels.desktop.agent.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@cslee
cslee / vpn.md
Created November 30, 2019 14:24 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

A Russian translation of this article can be found here, contributed by Timur Demin. There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.

Why not?

@cslee
cslee / 1-securing-express.md
Created June 28, 2019 04:51 — forked from cerebrl/1-securing-express.md
Securing ExpressJS

tl;dr

  1. Don't run as root.
  2. For sessions, set httpOnly (and secure to true if running over SSL) when setting cookies.
  3. Use the Helmet for secure headers: https://github.com/evilpacket/helmet
  4. Enable csrf for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf
  5. Don't use the deprecated bodyParser() and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer property and pipe() the multipart upload stream to the intended destination.
@cslee
cslee / ffmpeg-web-video-guide.md
Created February 27, 2019 15:11 — forked from jaydenseric/ffmpeg-web-video-guide.md
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@cslee
cslee / Search my gists.md
Created January 14, 2019 02:20 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files. language:html

@cslee
cslee / happy_git_on_osx.md
Last active November 28, 2018 02:37 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X #dev #config #commands

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

@cslee
cslee / docker-cleanup-resources.md
Last active November 28, 2018 02:35 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks #dev #commands

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@cslee
cslee / iterm2-solarized_instructions.md
Last active November 28, 2018 02:36 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS) #dev #config

How to install

iTerm2

brew cask install iterm2

Or, if you do not have homebrew (you should ;)): Download and install iTerm2

iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.