Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

p0we7

🏠
Working from home
View GitHub Profile
@p0we7
p0we7 / pre_complie.sh
Created Mar 23, 2021
Reptile CentOS Environmental Installation
View pre_complie.sh
yum install git kernel-devel ncurses-devel
yum groupinstall 'Development Tools'
rm -f /lib/modules/3.10.0-1127.18.2.el7.x86_64/build
ln -s /usr/src/kernels/3.10.0-1160.15.2.el7.x86_64/ /lib/modules/3.10.0-1127.18.2.el7.x86_64/build
@p0we7
p0we7 / ssr_decode.py
Created Sep 22, 2020
Decode SSR subscription
View ssr_decode.py
import requests
import base64
import re
def base64decode(text):
i = len(text) % 4
if i == 1:
text = text + '==='
elif i == 2:
@p0we7
p0we7 / 4px.py
Last active Jul 12, 2020
每隔一个4x4像素方格隔开一个像素
View 4px.py
from PIL import Image
import numpy as np
# import matplotlib.pyplot as plt
img_array = np.array(Image.open('t3.png').convert('RGBA'))
w = img_array.shape[0] # 获取图片宽度
h = img_array.shape[1] # 获取图片高度
# 根据原图尺寸放大创建一个放大后的图片
@p0we7
p0we7 / special_chh.js
Last active Nov 25, 2016
Specially JavaScript Source
View special_chh.js
//CHH Automload topic page
function test(){
var i = 0;
(function(){
if (i>=50){console.log(i);return;}
$("autopbn").click();
console.log(i);
i++;
window.setTimeout(arguments.callee,2000);
})();
@p0we7
p0we7 / himawari8.rb
Last active Dec 15, 2015
Get hight quality image via himawari8 by @pepsin
View himawari8.rb
require 'net/http'
require "cairo"
def get_url time, x, y
str = "http://himawari8-dl.nict.go.jp/himawari8/img/D531106/20d/550/#{time}00_#{x}_#{y}.png"
end
def merge time
puts "Start image process"
w = 20
@p0we7
p0we7 / xnsCloud_v3.py
Last active Oct 22, 2019
Cloudxns DDNS Script v3.1 [ 代码末尾有安装方法 ]
View xnsCloud_v3.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: p0we7
# Email : i@iu.vc
def handle_import_error():
print '\n' + "Import Error:"
print 'Please install the required 3rd-party modules ' + '\033[4;95m' + 'requests' + '\033[0m' + '\n'
import sys
sys.exit()