Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cxjava's full-sized avatar
🎯
Focusing

Char cxjava

🎯
Focusing
View GitHub Profile
@cxjava
cxjava / jwtRS256.sh
Created June 22, 2021 06:06 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@cxjava
cxjava / jwtRS256.sh
Created June 22, 2021 06:06 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@cxjava
cxjava / SmartMover.vbs
Created December 9, 2020 01:26 — forked from etnperlong/SmartMover.vbs
百度网盘 <-> Rclone 转存 OneDrive 自动化VBS脚本
'---------------------------------------------------
' 百度网盘 <-> Rclone 转存 OneDrive 自动化VBS脚本
' Version: 0.422
'
' 功能:
' - 按目录结构转存
' - 配合 Folder Monitor 等文件夹监控工具
' - 转存完毕后可删除源文件,节省硬盘空间
' - 可通过 Telegram 和 ServerChan 推送通知
' - 可保存转存日志
@cxjava
cxjava / compile-ffmpeg.sh
Created June 23, 2020 03:56 — forked from wildrun0/compile-ffmpeg.sh
Compiling ffmpeg for Raspberry Pi 4
#!/bin/bash
# Note that there's no libdrm because this lib cause errors
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install \
autoconf \
automake \
build-essential \
# Raspberry Pi的GPU对 H264有一系列针对 MPEG4 H264、MPEG2 和 VC1(需要额外授权)的硬件加速优化,为了得到最好的性能,建议先对树莓派的启动设置文件(/boot/config.txt)进行如下的调整:
gpu_mem=256
framebuffer_depth=16
# 直接使用 apt-get 安装的ffmpeg没有专门的优化,对硬解的支持不好,所以需要自己从源码编译安装,首先用 apt-get 安装一些必要的包:
apt-get install autoconf automake build-essential libass-dev libfreetype6-dev libtheora-dev libtool libvorbis-dev pkg-config texinfo zlib1g-dev unzip cmake yasm libx264-dev libmp3lame-dev libopus-dev bzip2-dev
sudo apt-get install libomxil-bellagio-dev libfreetype6-dev libmp3lame-dev checkinstall libx264-dev fonts-freefont-ttf libasound2-dev -y
cd ~
git clone https://github.com/FFmpeg/FFmpeg.git --depth 1
cd FFmpeg
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-mmal --enable-indev=alsa --enable-outdev=alsa
# For old hardware / Pi zero remove the `-j4`
make -j4
sudo make install
sudo checkinstall --pkgname=ffmpeg -y
@cxjava
cxjava / ffmpeg-rpi-4.sh
Created April 19, 2020 12:55
Compile ffmpeg on 32-bit Raspberry Pi 4
#!/bin/bash
#
# Compile ffmpeg on 32-bit Raspberry Pi 4
#
# Usage
# =====
# ./ffmpeg-rpi-4.sh
# or
# curl -L "https://git.io/JvgLF" | bash
@cxjava
cxjava / chocolatey
Created August 23, 2014 02:27
chocolatey 代理设置
https://gist.github.com/da9l/2852270 设置代理
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$wc=new-object net.webclient; $wp=[system.net.WebProxy]::GetDefaultProxy(); $wp.UseDefaultCredentials=$true; $wc.Proxy=$wp; iex ($wc.DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
设置 代理
http://escapologist.wordpress.com/2013/02/27/nuget-and-chocolatey-behind-a-proxy/
.\nuget config -Set http_proxy=127.0.0.1:9087
@cxjava
cxjava / index.js
Created August 21, 2014 05:26 — forked from edokeh/index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@cxjava
cxjava / DNS
Last active August 29, 2015 13:56
DNS
#江苏省南京市
114.114.114.114
114.114.115.115
#阿里云服务器
42.120.21.30
223.6.6.6
223.5.5.5
#台湾省
168.95.1.1
168.95.192.1