* 已取得root权限的极路由 * 安装dnsmasq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.server | |
import ssl | |
import urllib.request | |
import argparse | |
import logging | |
import brotli | |
import gzip | |
import io | |
import zlib | |
from urllib.parse import urlparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from termcolor import colored | |
import subprocess | |
import shutil | |
def convert_to_bytes(size_str): | |
"""Converts a size string in bytes with units of "M" and "G" to an integer in bytes.""" | |
size_str = size_str.strip() | |
if size_str.endswith('M'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const glob = require('glob'); | |
const fs = require('fs-extra'); | |
const path = require('path'); | |
const srcFolder = './src'; // 您的源代码文件夹 | |
const fileTypes = ['**/*.js', '**/*.jsx']; // 您想要检查的文件类型 | |
function searchFiles(pattern, folder) { | |
return new Promise((resolve, reject) => { | |
glob(pattern, { cwd: folder }, (err, files) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import Thread | |
import threading | |
import Queue as queue | |
import urllib2 | |
import time | |
import os | |
import sys | |
def pretty(size, th=1024): | |
unit = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/zealdocs/zeal.git | |
cd zeal | |
sudo apt-get install qt5-default qtbase5-private-dev libqt5webkit5-dev libqt5x11extras5-dev libarchive-dev libappindicator-dev libxcb-keysyms1-dev | |
qmake | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/zealdocs/zeal.git | |
cd zeal | |
sudo apt-get install qt5-default qtbase5-private-dev libqt5webkit5-dev libqt5x11extras5-dev libarchive-dev libappindicator-dev libxcb-keysyms1-dev | |
qmake | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// downloader | |
// | |
// Created by Wenliang XIAO on 3/12/14. | |
// Copyright (c) 2014 LandscapeMobile. All rights reserved. | |
// | |
// Remeber to link against libz.dylib when building |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
show) | |
redis-cli <<-EOF | |
select 9 | |
keys * | |
EOF | |
;; | |
del) | |
redis-cli <<-EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis | |
class Token(object): | |
def __init__(self, n, limit, period): | |
self.n = n | |
self.limit = limit | |
self.period = period | |
def available(self): |
NewerOlder