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 crypto = require('crypto') | |
console.log({ | |
sha256: crypto.createHash('sha256').update('data').digest('hex'), | |
sha512: crypto.createHash('sha512').update('data').digest('hex') | |
}) |
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
import { add } from './function.mjs' | |
import assert from 'node:assert' | |
let result = add(1, 2) | |
assert.equal(result, 3, 'add(1, 2) should return 3') | |
result = add(1, '2') | |
assert.equal(result, 3, 'add(1, "2") should not return 3') |
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 add = (a, b) => a + b | |
export { add } |
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 YOUTUBE_KEY = "YOUR YOUTUBE KEY" | |
import axios = from 'axios'; | |
function getVideoId(link) { | |
const videoId = link.match(/v=(?<videoId>.*)/)?.groups?.videoId | |
return videoId | |
} | |
async function getVideoViews(link) { | |
const videoId = getVideoId(link) |
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 axios = require('axios') | |
class GDEAPI { | |
constructor({ token }) { | |
this.token = token | |
} | |
async submitContributions(body) { | |
const headers = { | |
"accept": "application/json, text/plain, */*", | |
"accept-language": "en-US,en;q=0.9", |
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
// paste this file on a empty directory | |
// npm i axios | |
// You should go to your browser on Cookie session and get JSESSIONID and li_at from Linkedin Section | |
const JSESSIONID = 'YOUR JSESSIONID' | |
const liAT = 'YOUR li_at' | |
import axios from 'axios' | |
const headers = { |
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
#!/bin/bash | |
# Delete a branch interactively | |
git branch | fzf | xargs -n1 git branch -D | |
# Switch to branch interactively | |
git branch -a | fzf | sed 's+remotes/origin/++g' | xargs git switch |
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
// Run this in the devtools console, inside the linkedin friend request list | |
// Make sure to have all the requests displayed in the screen | |
// If something goes funky, increase the sleep time. | |
itens = [] | |
document.querySelectorAll('.invitation-card__action-btn.artdeco-button--secondary').forEach(item => itens.push(item)) | |
sleep = ms => new Promise(resolve => setTimeout(resolve, ms)) | |
for (item of itens) { | |
item.click() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Benchmark for transaction balance</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: app | |
labels: | |
name: app | |
spec: | |
containers: | |
- name: app-ctr | |
image: khaosdoctor/go-vote-api |