Skip to content

Instantly share code, notes, and snippets.

@jtr109
jtr109 / twitframe.sh
Created February 4, 2021 05:47
Twitframe iframe generation
echo 'encode this' | jq -sRr @uri | sed -r 's/^(.*)$/<iframe border=0 frameborder=0 height=250 width=550 src="https:\/\/twitframe.com\/show?url=\1"><\/iframe>/g'
@jtr109
jtr109 / README.md
Last active October 20, 2020 03:01
《程序员修炼之道:通向务实的最高境界(第2版)》链接列表
@jtr109
jtr109 / README.md
Created December 10, 2019 01:48
export or not in env file
bash subenv.sh
bash subexp.sh
@jtr109
jtr109 / docker-compose.yml
Created October 29, 2019 07:03
Nginx docker-compose
version: '3'
services:
nginx:
image: nginx:1.17.5-alpine
ports:
- 80:80
- 443:443
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./log:/var/log/nginx
@jtr109
jtr109 / Dockerfile.alpine
Last active June 16, 2019 04:43
change timezone in dockerfile
FROM alpine:3.9
RUN apk add --no-cache tzdata //
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
CMD date
@jtr109
jtr109 / README.md
Last active June 5, 2019 10:34 — forked from rust-play/playground.rs
Code shared from the Rust Playground
@jtr109
jtr109 / README.md
Last active December 14, 2018 04:03
Find current directory and file's directory

Find current directory and file's directory

To get the full path to the directory a Python file is contained in, write this in that file:

import os 
dir_path = os.path.dirname(os.path.realpath(__file__))

(Note that the incantation above won't work if you've already used os.chdir() to change your current working directory, since the value of the file constant is relative to the current working directory and is not changed by an os.chdir() call.)

@jtr109
jtr109 / README.md
Last active December 9, 2018 01:03
Computer English

英语中的数学表达

@jtr109
jtr109 / netstat.sh
Created December 6, 2018 08:17
list port opened
sudo netstat -plnt
@jtr109
jtr109 / README.md
Last active December 6, 2018 08:16
git submodule pulling