Skip to content

Instantly share code, notes, and snippets.

Avatar
😾
Meowing

NeverBehave NeverBehave

😾
Meowing
View GitHub Profile
View common.sh
###
# Search for and execute (if found) preimage script.
###
run_preimage_script()
{
preimage_script=/usb_drive/emctools/"$ENV_MODEL"_images/preimage.sh
echo -n "Checking for pre-image script... "
if [ -x $preimage_script ]
@NeverBehave
NeverBehave / transcript.txt
Created Apr 25, 2021
http://tingshen.court.gov.cn/live/18743120 ffmpeg抓流然后喂给讯飞听见的转录结果
View transcript.txt
out2.mp3
说话人1 00:00
好,今天上午审理的案件案号是2020月0192民初24388号案,现在核对当事人原告深圳市腾讯计算机系统有限公司是否在线,那些那些人员姓名、身份、代理权限。
说话人2 00:22
王忠鹏。
说话人3 00:24
广东信达律师事务所律师,代理权限是特别授权。
说话人4 00:29
原告代理人林兰占系公司员工,授权范围是特别授权。
说话人1 00:36
@NeverBehave
NeverBehave / data.json
Last active Dec 5, 2021
Twitter Like Data
View data.json
{
"since_id": [
"1452646580205469702",
"1452616357879549953",
"1452486539603111941",
"1452486283062702084",
"1452485722670174211",
"1452483224425295881",
"1452482755241988102",
"1452480718475431938",
View refresh-cert.sh
#!/usr/bin/env bash
set -e
# Purpose: Update Server certificates
# find certificates that might need an update
# cd / && find . -name "*.pem"
declare -a CERT_DIRS
CERT_DIRS=(\ '/usr/syno/etc/certificate/AppPortal/VideoStation/' \ '/usr/syno/etc/certificate/AppPortal/AudioStation/' \ '/usr/syno/etc/certificate/AppPortal/FileStation/' \ '/usr/syno/etc/certificate/AppPortal/DownloadStation/' \ '/usr/local/etc/certificate/DirectoryServer/slapd/' \ '/usr/local/etc/certificate/LogCenter/pkg-LogCenter/' \ '/usr/local/etc/certificate/WebStation/vhost_225bb9ca-d884-44dd-a0f9-83ff557b95d6/' \ '/usr/local/etc/certificate/CloudStation/CloudStationServer/' \ '/usr/syno/etc/certificate/smbftpd/ftpd/' \ '/usr/syno/etc/certificate/system/FQDN/' \ '/usr/syno/etc/certificate/system/default/' )
urlbase='https://cert.example.com/'
filebase='synology'
base="${urlbase}${filebase}"
@NeverBehave
NeverBehave / snippe.js
Created Jul 27, 2020
扫描全能王网页版批量下载, 解除文件夹下载限制
View snippe.js
const list = [] // 可用于协同检查本地文件列表
const hasChild = (title) => list.includes(title) ? true : list.push(title) && false
const text = (e) => e.parentElement.parentElement.children[1].children[0].children[0].textContent
inn = 0
document.querySelectorAll('.doc_more_opt').forEach((e) => {
setTimeout(() => {
const title = text(e)
if (!hasChild(title)) {
console.log(title)
@NeverBehave
NeverBehave / mergeLine.js
Created Jun 9, 2020
[srt] merge line with same time code
View mergeLine.js
const subtitle = require("subtitle")
const fs = require("fs")
const path = require("path")
function merge(parsed) {
let i = 0, currentStart = parsed[i].start, currentEnd = parsed[i].end, text = parsed[i].text, pushed = true
const result = []
i++
for (;i < parsed.length; i++) {
if (currentStart !== parsed[i].start && currentEnd !== parsed[i].end) {
@NeverBehave
NeverBehave / README.md
Last active Nov 6, 2020
OWL token 2020 (does not applied for Mainland China)
View README.md

Assume Anything sent to youtube does not share with Blizzard

then the only xhr to record watching behavior should be:

https://sentinel.majorleaguegaming.com/api/v1/viewers/owl

It have been proved working on my own account; script can be found here: https://runkit.com/neverbehave/5eca0400df5906001a118075

View cdn-benchmark.gog.com.json
[
{
"url":"https://cdn-api.gog.com/open/tests/100KB.png",
"hosting":"GOG",
"purpose":"initial",
"sizeBytes":98722
},
{
"url":"https://cdn-api.gog.com/open/tests/100MB.png",
"hosting":"GOG",
@NeverBehave
NeverBehave / README.md
Last active Nov 26, 2020
/sao@NeverBehave
View README.md
@NeverBehave
NeverBehave / README.md
Last active Nov 5, 2019
First 100,000 prime numbers in python
View README.md

First 100,000 prime number

sometimes we are asked to calculate something with prime numbers in ctf, and a list of pre-calculated value may help speed up a bit.

Usage

from prime_number_100000 import prime_number_100000

>>> prime_number_100000()