Skip to content

Instantly share code, notes, and snippets.

  • Install Ruby with openssl 1.0

    brew switch openssl 1.0.2s
    export PATH="/usr/local/opt/[email protected]/bin:$PATH"
    export LDFLAGS="-L/usr/local/opt/[email protected]/lib ${LDFLAGS}"
    export CPPFLAGS="-I/usr/local/opt/[email protected]/include ${CPPFLAGS}"
    RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2s/ rbenv install 2.3.0
  • Fix and use libxml2

#!/usr/bin/env bash
set -euo pipefail
set -x
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${ROOT_DIR}"
SOURCE_CONFIG_URL="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-integrations/connectors/source-file/integration_tests/config.json"
SOURCE_IMAGE_NAME="airbyte/source-file"
@tuliren
tuliren / partialTypePredicate.ts
Last active July 18, 2023 23:25
Partial Type Predicate in TypeScript
interface Base {
base1: string;
base2: string;
a: string;
}
interface Interface1 extends Base {
b: number;
}
@tuliren
tuliren / show_wallpaper_on_desktop.md
Created August 11, 2023 04:12
Commands to show or hide wallpaper filename on Mac desktop
# show
defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE  && killall Dock
# hide
defaults write com.apple.dock desktop-picture-show-debug-text -bool FALSE  && killall Dock
@tuliren
tuliren / README.md
Last active July 20, 2024 19:46
Cloudflare redirection

Cloudflare redirection

Example: redirect from old.com to new.com, and www.old.com to www.new.com

Add redirect rule

  • Go to Rules / Redirect Rules page
  • Create a new rule
  • Select Custom filter expression
  • Add matching rules
  • Field Hostname, operator equals, value old.com, or