Skip to content

Instantly share code, notes, and snippets.

View rockstar2046's full-sized avatar

R rockstar2046

  • 天朝
View GitHub Profile
@rockstar2046
rockstar2046 / bj-unicom-iptv.m3u
Created February 16, 2024 15:47 — forked from sdhzdmzzl/bj-unicom-iptv.m3u
北京联通iptv列表
#EXTM3U name="bj-unicom-iptv"
#EXTINF:-1,CCTV1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV7
rtp://239.3.1.7:8024
#EXTINF:-1,CCTV9
@rockstar2046
rockstar2046 / chatpdf-zh.ipynb
Created May 10, 2023 16:06 — forked from ninehills/chatpdf-zh.ipynb
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env sh
TARGET="/data/BTSync/ws/"
# config
ARCHIVE_LINE=`awk '/^__ARCHIVE_CONTENT__/ {print NR+1;exit 0;}' "$0"`
tail -n+$ARCHIVE_LINE "$0" | xargs -I{} echo "rsync -aviP {} ${TARGET}" | sh
[user]
name =
email =
[core]
editor = vim
autocrlf = input
excludesfile = ~/.gitignore_global
[color]
diff = auto
status = auto
@rockstar2046
rockstar2046 / msismember.lua
Last active December 4, 2019 14:12
msismember.lua
local key = KEYS[1]
if redis.call('EXISTS', key) == 1 then
local r = 0
for i, v in ipairs(ARGV) do
if redis.call('SISMEMBER', key, v) == 1 then
r=r+1
end
end
return r
@rockstar2046
rockstar2046 / merlin-build.sh
Last active May 22, 2019 08:13
### Install fresh Ubuntu 18.04 LTS (Bionic Beaver) ubuntu-18.04.2-desktop-amd64.iso
### Apply OS updates and make bash the default shell (reboot required)
sudo apt-get update && sudo apt-get -y dist-upgrade && sudo rm -f /bin/sh && sudo ln -sf bash /bin/sh && sudo reboot
### Install Linux kernel headers and essential development tools
sudo apt-get update && sudo apt-get -y install git build-essential linux-headers-$(uname -r)
@rockstar2046
rockstar2046 / Manjaro_init.sh
Created May 14, 2019 12:23 — forked from corerman/Manjaro_init.sh
Manjaro 安装后的操作
0. 安装
# 启动时选择第二项boot(non-free),Manjaro自带的驱动精灵会帮你安装好所需驱动,笔记本双显卡则会帮你安装bumblebee
driver boot(non-free)
如果是WIndows+Manjaro双系统安装,
步骤可以参考:https://my.oschina.net/langxSpirit/blog/1633384
@rockstar2046
rockstar2046 / abbr.md
Created March 28, 2019 10:48
code abbr list
abbr full name
addr Address
adm Administrator
app Application
arg Argument
asm assemble
asyn asynchronization
avg average
DB Database
@rockstar2046
rockstar2046 / wrk_upload.lua
Created March 21, 2019 11:14
wrk upload file test
-- HTTP POST script which simulates a file upload
-- HTTP method, body, and adding a header
-- See https://tools.ietf.org/html/rfc1867
function read_txt_file(path)
local file, errorMessage = io.open(path, "r")
if not file then
error("Could not read the file:" .. errorMessage .. "\n")
end
@rockstar2046
rockstar2046 / shadowsocks-server.sh
Created December 10, 2018 06:39
Run script as system service
#!/bin/sh
### BEGIN INIT INFO
# Provides: shadowsocks server
# Required-Start: $local_fs $remote_fs $named $network $time
# Required-Stop: $local_fs $remote_fs $named $network $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1
# Short-Description: Shadowsocks server
# Description: Shadowsocks proxy server
### END INIT INFO