Skip to content

Instantly share code, notes, and snippets.

View thiefjim's full-sized avatar
🎯
Focusing

Jingjie.j.lin thiefjim

🎯
Focusing
View GitHub Profile
@thiefjim
thiefjim / auto-caption-tools.md
Created February 8, 2023 08:51 — forked from BrendonKoz/auto-caption-tools.md
Automatic Captioning Tools
@thiefjim
thiefjim / bufferCrypto.js
Created February 21, 2020 05:34
Buffer crypt and decrypt in Node.js
var fs = require("fs");
var crypto = require("crypto");
var password = "5e4520bc02743900018e863b";
//"salt"
var key = crypto.scryptSync(password, "5e4520bc02743900018e863b", 24);
console.log(`Key ${key.toString("hex")}`);
var iv = crypto.randomBytes(16); // Initialization vector.
console.log(`iv ${iv.toString("hex")}`);
@thiefjim
thiefjim / streamCrypto.js
Created February 21, 2020 05:32
Stream crypt and decrypt in Node.js
var fs = require("fs");
var crypto = require("crypto");
var password = "5e4520bc02743900018e863b";
//"salt"
var key = crypto.scryptSync(password, "salt", 24);
console.log(`Key ${key.toString("hex")}`);
var iv = crypto.randomBytes(16); // Initialization vector.
console.log(`iv ${iv.toString("hex")}`);
@thiefjim
thiefjim / addTextForBooks.vba
Last active March 21, 2019 05:15
Word VBA add Character for all shapes
Sub addTextForBooks()
'
' addTextForBooks 巨集
'
'
Dim shp As Shape
For Each shp In ActiveDocument.Shapes
Dim countStr As Integer
Debug.Print shp.ZOrderPosition
shp.Select
@thiefjim
thiefjim / docker-tensorflow-latest-gpu-opencv3.3-python3
Created March 29, 2018 08:29
docker-tensorflow-latest-gpu-opencv3.3-python3
# Dockerfile with tensorflow gpu support on python3, opencv3.3
FROM tensorflow/tensorflow:latest-gpu-py3
MAINTAINER Fergal Cotter <fbc23@cam.ac.uk>
# The code below is all based off the repos made by https://github.com/janza/
# He makes great dockerfiles for opencv, I just used a different base as I need
# tensorflow on a gpu.
RUN apt-get update
@thiefjim
thiefjim / Install NVIDIA Driver and CUDA.md
Last active March 30, 2018 04:39 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@thiefjim
thiefjim / pycharm.bat
Last active July 5, 2018 03:41 — forked from arieljannai/pycharm.bat
Add PyCharm to context menu (right click menu)
@echo off
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script
@rem run with powershell %a% will works if the program is in C:
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i
SET PyCharmPath=D:\Program Files\JetBrains\%a%\bin\PyCharm64.exe
echo %PyCharmPath%
echo Adding file entries
@thiefjim
thiefjim / pptanifilter.py
Created February 7, 2018 06:38
Powerpoint animation pdf filter
from pdfrw import PdfReader, PdfWriter
pdfdata = PdfReader("ifm.pdf")
pages = PdfReader("ifm.pdf").pages
outData = PdfWriter("ifmedit.pdf")
wanted = pdfdata['/Root']['/PageLabels']['/Nums'][0::2]
for i in wanted:
outData.addPage(pages[int(i)-1])
outData.write()
@thiefjim
thiefjim / osx-10.10-setup.md
Last active September 28, 2015 17:27 — forked from jacyzon/osx-10.9-setup.md
Clean Install – Mac OS X 10.10 Yosemite

Mac OS X 10.10 Yosemite

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store