Skip to content

Instantly share code, notes, and snippets.

View muxueqz's full-sized avatar

muxueqz muxueqz

View GitHub Profile
#!/usr/bin/env python
import json, sys, urllib
import urllib.parse
import urllib.request
gitlab_endpoint = 'http://gitlab-site/api/v4/'
token = ""
headers = {'PRIVATE-TOKEN' : token}
@muxueqz
muxueqz / gist:e44cc666c24363d22250be306bca17c3
Created April 1, 2019 06:42
v2ray init script for OpenWRT
#!/bin/sh /etc/rc.common
# Copyright (C) 2013 OpenWrt.org
USE_PROCD=1
START=99
STOP=99
# SERVICE_DAEMONIZE=1
# SERVICE_WRITE_PID=1
import strutils
import osproc
let outp = execProcess("iwlist wlan0 scan | grep ESSID ")
var wifi_name = outp.split('"')[1]
proc ascii2utf8(s: string): string =
var u_strs: seq[int]
# for i in s.split("\\x"):
# if i.len > 1:
#!/bin/sh
workdir=/dev/shm/gitlab_auth_by_sh
mkdir -pv ${workdir}
cookies_file=`mktemp -p ${workdir}`
rm -rfv $cookies_file
gitlab_host="https://git_host"
gitlab_user=$username
gitlab_password=$password
name = KingSoft PEAP
author = muxueqz
version = 1
require identity *Identity password *Password
protected password *Password
-----
ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$_ESSID"
#!/bin/sh
ESSID=$1
wlan_client_interface=`iw dev | grep 'type managed' -B2 | grep Interface | cut -d' ' -f2`
wireless_channel=''
while [ "$wireless_channel" == '' ];do
wireless_channel=`iwlist ${wlan_client_interface} scan | grep -i $ESSID -B4 | grep Channel | head -n1 | cut -d: -f2`
done
sed -i "s/option channel '.*'/option channel '$wireless_channel'/g" /etc/config/wireless
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
print(Keys.ESCAPE)
# driver = webdriver.Chrome()
print('get')
driver = webdriver.Firefox()
url = 'https://www.wildberries.ru/catalog/0/search.aspx?kind=5&search=%D1%80%D1%8E%D0%BA%D0%B7%D0%B0%D0%BA'
driver.get(url)
// ==UserScript==
// @id googletranslatorbytoprapid
// @name Google select text translator
// @name:zh-CN 谷歌点击划词翻译
// @version 2.0
// @namespace https://greasyfork.org/en/scripts/36842
// @author Toprapid
// @copyright 2017+,toprapid
// @description Translate any selected text into the language you wants with google translator
// @description:zh-cn 谷歌点击划词翻译综合插件
# -*- encoding:utf-8 -*-
from kscore.session import get_session
if __name__ == "__main__":
s = get_session()
client = s.create_client("cdn", use_ssl=False)