Skip to content

Instantly share code, notes, and snippets.

View 0x4007's full-sized avatar
🕶️
shadowy super pull request reviewing

アレクサンダー.eth 0x4007

🕶️
shadowy super pull request reviewing
View GitHub Profile
@0x4007
0x4007 / auto-install.js
Created January 29, 2023 22:58
This helped me to setup puppeteer on my VPS. It kept throwing OS missing dependency errors, so this will parse the error and automatically install it.
const { execSync } = require('child_process');
function runYarn() {
// Run yarn ci command
try {
execSync('yarn ci');
console.log('yarn ci ran successfully');
} catch (err) {
// Extract the error message
const errorMessage = err.stderr.toString();
@0x4007
0x4007 / ethereum-keygen.sh
Last active August 9, 2023 18:17
For dApp development, its common for scripts to use `PRIVATE_KEY` and `PUBLIC_KEY` so for security reasons I automatically generate a temporary (but valid) keypair. I load this in with my `.bashrc`. Type in `keygen` to automatically generate a new keypair and assign to their respective variable names.
#!/bin/bash env
keygen() {
PREFIX="$HOME/.evm/"
KEY="$(echo "$PREFIX")key"
PUB="$(echo "$PREFIX")pub"
PRIV="$(echo "$PREFIX")priv"
ADDRESS="$(echo "$PREFIX")address"
@0x4007
0x4007 / special-gfm.md
Last active August 28, 2024 07:28
Special GFM

Note

test

Warning

test

Tip

test

@0x4007
0x4007 / max-permissions.js
Created January 24, 2024 05:16
Max Permissions
document.querySelectorAll('.SelectMenu-item').forEach(item => {
if (item.textContent.includes('Read and write')) {
item.click();
}
});
// Sometimes you might need to trigger a change event for the clicks to take effect
// This part is optional and depends on how GitHub's front-end is implemented
document.querySelectorAll('input[type=radio]').forEach(radio => {
if (radio.value === 'write') {
@0x4007
0x4007 / halo-pull-requests-evolved.md
Created August 22, 2024 17:33
Halo Pull Requests Evolved
  1. Guardian of the Sacred Rule (For branch_protection_rule) - "Protector of the code's purity, you enforce the sanctity of the branch."
  2. The Divine Architect (For branch_protection_rule.created) - "Creator of the sacred laws, you establish the rules that shape the branch’s destiny."
  3. Breaker of Chains (For branch_protection_rule.deleted) - "Releaser of bonds, you remove the constraints, allowing freedom to reign."
  4. The Oracle's Edit (For branch_protection_rule.edited) - "Modifier of the divine decree, your changes resonate through the codebase."
  5. Watcher of the Sentinel (For check_run) - "Overseer of the vigilant, ensuring the integrity of every check."
  6. Final Judgment (For check_run.completed) - "Deliverer of the verdict, your assessment is the final word in the trials."
  7. Genesis of the Watch (For check_run.created) - "Initiator of the watchful, your command brings the sentinel to life."
  8. Invoker of the Sentinel (For check_run.requested_action) -