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 fs = require('fs'); | |
const {join} = require('path'); | |
function readDirAll(path, files = []) { | |
if (fs.lstatSync(path).isDirectory()) { | |
fs.readdirSync(path).forEach((entry) => { | |
if (entry !== '.' && entry !== '..') { | |
readDirAll(join(path, entry), 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
#!/bin/bash | |
function getStatus () { | |
ifconfig | grep $1 && return 1 | |
return 0 | |
} | |
getStatus tun0 | |
if [[ $? == 0 ]]; | |
then |
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 | |
function writeHR { | |
echo '---------------------' | |
} | |
function sync { | |
while read line | |
do | |
writeHR; |
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 buttons = document.getElementsByClassName('_54k8 _52jg _56bs _26vk _2b4n _56bt'); | |
Object.values(buttons) | |
.forEach((button) => button.click()); | |
})(); |
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 regist = function (code) { | |
$.ajax({ | |
type: 'POST', | |
url: `/chon-mon-hoc/${code}/1/2`, | |
success: (a, b) => { | |
commit(code); | |
}, | |
error: (a, b) => { | |
commit(code); | |
}, |
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
(() => { | |
let x = document.getElementsByTagName('input'); | |
for (let i = 0; i < x.length; i++) { | |
if (x[i].value === "4") { | |
x[i].click(); | |
} | |
} | |
let submit = document.getElementsByName('submit')[0]; | |
submit.click(); | |
})(); |