Skip to content

Instantly share code, notes, and snippets.

View alanljj's full-sized avatar
🎯
Focusing

ITGeeker alanljj

🎯
Focusing
View GitHub Profile
@alanljj
alanljj / 关于KMS,以及自己写的脚本
Created January 22, 2024 00:56 — forked from 798886844/关于KMS,以及自己写的脚本
关于KMS,以及自己写的脚本
玩激活玩了很久了,很多人不懂什么是KMS,和普通的密钥激活有什么区别。大多数人对KMS的认识都停留在“病毒”、“修改主页”,或者是“180天循环激活”和“非永久激活”这些个层面上。并且这种意识被越来越多的人所接受,被越来越多的大佬所不齿。
但是我今天要告诉你的是,这种认识是错误的。
#### 先了解一下微软的激活机制吧。
上个世纪的产品我就不说了,我就从最近的产品开始说起吧,包括Windows 7及其以后的版本,Office 2010及其以后的版本。
从这个版本时代开始,微软主打的就是对企业和政府以及教育行业的产品开发,个人业务不再是其主要发展对象。也是从这个时代开始,微软取消了本地激活码的激活方式,而是采取了看上去更能防止盗版的在线激活的方式。
@alanljj
alanljj / README.md
Created December 31, 2022 14:12 — forked from GermanAizek/README.md
Openwrt - Extend disk space for apps

Instructions for expanding space for openwrt programs. In most cases, 2Gb will be enough. We will install the necessary packages for working with USB devices

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install nano kmod-usb-core block-mount kmod-fs-ext4 kmod-usb-storage-extras e2fsprogs blkid

After install fdisk package

@alanljj
alanljj / iptv.tvfix.org.m3u8.txt
Created February 3, 2022 17:48 — forked from woodongwong/iptv.tvfix.org.m3u8.txt
iptv.tvfix.org(电视侠)直播源
央视高清
CCTV-4K(色彩准确) : http://iptv.tvfix.org/hls/cctv4k.m3u8
CCTV-1高清 : http://iptv.tvfix.org/hls/cctv1hd.m3u8
CCTV-1香港版高清 : http://iptv.tvfix.org/hls/cctv1hdhk.m3u8
CCTV-2高清 : http://iptv.tvfix.org/hls/cctv2hd.m3u8
CCTV-3高清 : http://iptv.tvfix.org/hls/cctv3hd.m3u8
CCTV-4高清 : http://iptv.tvfix.org/hls/cctv4hd.m3u8
CCTV-5高清 : http://iptv.tvfix.org/hls/cctv5hd.m3u8
CCTV-5+高清 : http://iptv.tvfix.org/hls/cctv5phd.m3u8
CCTV-6高清 : http://iptv.tvfix.org/hls/cctv6hd.m3u8
@alanljj
alanljj / xml_rpc.py
Created May 22, 2019 07:37 — forked from ilyasProgrammer/xml_rpc.py
Odoo xml rpc example
import xmlrpclib
from datetime import datetime
# url = "http://localhost:8069"
# db = "RAJO"
# username = 'a'
# password = 'a'
url = "https://erp.atlantis-kw.com"
db = "RAJO_TEST"
username = 'api'
@alanljj
alanljj / wp-permissions-script
Created May 16, 2018 02:47 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory
@alanljj
alanljj / lychee
Created March 15, 2018 06:33 — forked from ottonet/lychee
lychee nginx config
server {
server_name my.lychee.site;
listen 80;
root /var/www/my.lychee.site/htdocs;
access_log /var/www/my.lychee.site/logs/access.log;
error_log /var/www/my.lychee.site/logs/error.log;
index index.php index.html;
@alanljj
alanljj / mysql-docker.sh
Created February 28, 2018 09:50 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@alanljj
alanljj / postgres
Created January 15, 2018 02:32 — forked from mmrwoods/postgres
Postgres maintenance crontab file
# dump all databases once every 24 hours
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night)
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze"
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet"
# re-index all databases once a week
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"'
@alanljj
alanljj / re.py
Created November 11, 2017 14:41 — forked from dervn/re.py
Python中过滤HTML标签的函数
#用正则简单过滤html的<>标签
import re
str = "<img /><a>srcd</a>hello</br><br/>"
str = re.sub(r'</?\w+[^>]*>','',str)
print str
@alanljj
alanljj / .stglobalignore
Created September 6, 2017 02:21 — forked from jult/.stglobalignore
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// Incomplete Downloads and such.
// For now, these prevent Syncthing from transferring data that's
// going to be thrown out anyway once the download is finished and the
// file is renamed. Stuff may alter when Syncthing gets smarter.
//
// Firefox downloads and other things
*.part
// Chrom(ium|e) downloads