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
#!/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} |
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/sh /etc/rc.common | |
# Copyright (C) 2013 OpenWrt.org | |
USE_PROCD=1 | |
START=99 | |
STOP=99 | |
# SERVICE_DAEMONIZE=1 | |
# SERVICE_WRITE_PID=1 |
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 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: |
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/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 |
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
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" |
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/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 |
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 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) |
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 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) |
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
// ==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 谷歌点击划词翻译综合插件 |
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
# -*- encoding:utf-8 -*- | |
from kscore.session import get_session | |
if __name__ == "__main__": | |
s = get_session() | |
client = s.create_client("cdn", use_ssl=False) |