Skip to content

Instantly share code, notes, and snippets.

@zhm
zhm / restart-typescript-eslint.md
Created May 10, 2025 15:32
Keyboard shortcut to restart TypeScript and ESLint for VSCode and Cursor

Install macros extension

Add this to settings.json, cmd+shift+p Preferences: Open User Settings (JSON)

"macros": {
  "restartTypeScript": [
    "eslint.restart",
    "typescript.restartTsServer"
  ]
}

GitHub Issues in Cursor

  • Install GitHub Pull Requests extension
  • Add keybinding to open a new issue, cmd+shift+p go to Preferences: Open Keyboards Shortcuts (JSON)
  • Add this entry in the JSON:
{
  "key": "ctrl+shift+i",
 "command": "issue.createIssue",
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@zhm
zhm / install-wkhtmltopdf.sh
Last active September 7, 2017 16:18
Install wkhtmltpdf on Linux
#!/usr/bin/sh
DOWNLOAD_URL="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz"
cd ~
wget $DOWNLOAD_URL -O ~/wkhtmltox.tar.xz
tar -xvf ~/wkhtmltox.tar.xz
@zhm
zhm / biscuits-and-gravy.md
Created December 23, 2016 23:11
Biscuits and Gravy

Biscuits

  • 1 pound White Lily self-rising flour
  • 1 1/2 cups buttermilk
  • 1/4 pound frozen butter
  • Salt + Pepper

Gravy

  • 1 pound sausage, any kind you want
module ActionController
# This module provides a method which will redirect browser to use HTTPS
# protocol. This will ensure that user's sensitive information will be
# transferred safely over the internet. You _should_ always force browser
# to use HTTPS when you're transferring sensitive information such as
# user authentication, account information, or credit card information.
#
# Note that if you are really concerned about your application security,
# you might consider using +config.force_ssl+ in your config file instead.
# That will ensure all the data transferred via HTTPS protocol and prevent
<!DOCTYPE html>
<meta charset="utf-8">
<title>Non-Contiguous Cartogram</title>
<style>
.land {
fill: #fff;
stroke: #ccc;
}
@zhm
zhm / index.html
Last active January 4, 2016 02:09
<!DOCTYPE html>
<meta charset="utf-8">
<title>Non-Contiguous Cartogram</title>
<style>
.land {
fill: #fff;
stroke: #ccc;
}
@zhm
zhm / gist:5051253
Last active December 14, 2015 07:29
configure.in for GDAL 1.9.2
dnl ***************************************************************************
dnl $Id: configure.in 24333 2012-04-28 12:18:28Z rouault $
dnl
dnl Project: GDAL
dnl Purpose: Configure source file.
dnl Author: Frank Warmerdam, [email protected]
dnl
dnl ***************************************************************************
dnl Copyright (c) 2000, Frank Warmerdam
dnl
{
"address": {
"administrative": "Paris",
"city": "Paris",
"country": "France",
"country_code": "fr",
"county": "Paris",
"postcode": "75004",
"road": "Rue des Francs Bourgeois",
"state": "\u00cele-de-France",