Skip to content

Instantly share code, notes, and snippets.

@joswr1ght
joswr1ght / debugrequests.py
Created January 4, 2023 13:58
Add this code to Python scripts to debug HTTP requests activity and see request/response data
import logging
import requests
import http.client
http.client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
@kiding
kiding / install.sh
Last active February 24, 2022 15:21
Heterogeneous Homebrew: Apple Silicon & Intel Rosetta 2 side-by-side
# Install Homebrew at /opt/homebrew (for Apple Silicon)
arch -arm64e /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Homebrew at /usr/local (for Intel Rosetta 2)
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add these lines to ~/.zshrc
alias za="arch -arch arm64e /bin/zsh"
alias zi="arch -arch x86_64 /bin/zsh"
if [[ $(arch) == "arm64" ]]; then
@taylor224
taylor224 / README.md
Last active March 22, 2024 12:24
티스토리 블로그 백업하기 & 워드프레스로 이사하기

티스토리 블로그 백업하기 & 워드프레스로 이사하기

Tistory 블로그 백업 기능이 삭제 되어 백업할수 없는 분들을 위한 백업 스크립트 및 워드프레스로의 이전 방법입니다.

우선 tistory 의 스킨을 [사용중TickTalk(사용자 수정/업로드) ver.1.0(사용자 수정/업로드)] 으로 변경하시기 바랍니다. 본 스크립트와 설명은 이 스킨을 기반으로 제작되었습니다. 또한 환경설정 - 기본정보 - 블로그 정보 - 주소설정 에서 주소방식을 [숫자 (http://notice.tistory.com/123)] 로 변경하시기 바랍니다. 워드프레스를 미리 설치하신 후 워드프레스 블로그의 url 및 기타 설정을 미리 진행하셔야 합니다. 본 사항을 미리 수행하지 않을경우 스크립트가 동작하지 않을수 있습니다.

진행하기 전 모든 부분에 대해서 읽어보신 후 진행하시기 바랍니다. 사전작업이 필요할 수 있습니다.

@zvuc
zvuc / st3-ng2-html-highlighting.md
Last active March 28, 2018 01:22
Proper Syntax Highlighting for Angular2 HTML in Sublime Text 3

Note:

The latest version of this gist now lives in its own repository: https://github.com/zvuc/HTML-ng2.sublime-package Download the package file from the repo.

Fix ng2 attributes not being highlighted like other HTML attributes correctly

ADD: You can also install PackageResourceViewer from Package Control to open up and modify the package contents directly without having to manually rename, unpackage and copy.

  1. Find Sublime Text 3.app in Applications, View Package Contents
  2. Open Contents/MacOS/Packages/HTML.sublime-package (Rename to .zip, unpackage it)
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);