View what_is_1e3.js
This file contains 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
> parseInt(1000) | |
1000 | |
> parseInt(1000.0) | |
1000 | |
> parseInt("1000.0") | |
1000 | |
> parseInt(1e3) |
View helpers.js
This file contains 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 prev = oldVersion.split('.').map(Number); | |
const next = newVersion.split('.').map(Number); |
View parser.js
This file contains 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 maxLength = Math.max(...sheetsArray.map(subArr => subArr.length)); |
View 1681973573.js
This file contains 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 arr = [[1, 2, 3], [4, 5], [6, 7, 8, 9]]; const result = []; for (let i = 0; i < arr.length; i++) { for (let j = 0; j < arr[i].length; j++) { if (!result[j]) result[j] = []; result[j].push(arr[i][j]); } } const flatResult = result.flat(); console.log(flatResult); // [1, 4, 6, 2, 5, 7, 3, 8, 9] |
View quoteOfTheDay.js
This file contains 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 dtNow = new Date(); | |
const intTZOffset = dtNow.getTimezoneOffset() * 60000; // automatically adjust for user timezone | |
const intNow = dtNow.getTime() - intTZOffset; | |
const intDay = Math.floor(intNow / 86400000); // The number of 'local' days since Jan 1, 1970 | |
const randomIndex = intDay % QuotesData.length; | |
const item = QuotesData[randomIndex]; |
View chrome_get_page.py
This file contains 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
def get_page(url): | |
ua = r'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36' | |
exe = r'C:\Program Files\Google\Chrome\Application\chrome.exe' | |
args = f'"{exe}" --headless --disable-gpu --dump-dom --user-agent="{ua}" "{url}"' | |
sp = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
out, err = sp.communicate() | |
print(err, 'error') if err else None | |
return out.decode('utf-8') if out else '' |
View 1673869519.txt
This file contains 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
Use the built-in function enumerate(): | |
for idx, x in enumerate(xs): | |
print(idx, x) |
View StyledConsoleLog.js
This file contains 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
console.log('%c[MESSAGES.SCHEDULE at ]', 'color: blue;font-weight:bold') |
View module_websocketclient.pb
This file contains 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
; Websocketclient by Netzvamp | |
; Version: 2016/01/08 | |
DeclareModule WebsocketClient | |
Declare OpenWebsocketConnection(URL.s) | |
Declare SendTextFrame(connection, message.s) | |
Declare ReceiveFrame(connection, *MsgBuffer) | |
Declare SetSSLProxy(ProxyServer.s = "", ProxyPort.l = 8182) | |
Enumeration |
View 1672591592.txt
This file contains 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
IsDevTools ! #True |
NewerOlder