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
| network: | |
| version: 2 | |
| ethernets: | |
| eno1: | |
| dhcp4: false | |
| nameservers: | |
| addresses: | |
| - 8.8.8.8 | |
| - 8.8.4.4 | |
| dhcp6: false |
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 | |
| # Script name: gitlab-protect-branches | |
| # Description: Protect main and develop branches in any GitLab project | |
| # Usage: gitlab-protect-branches [options] | |
| # sudo vim /usr/local/bin/gitlab-protect-branches | |
| # sudo chmod +x /usr/local/bin/gitlab-protect-branches | |
| # gitlab-protect-branches --help |
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
| (async function automate() { | |
| let processed = 0; | |
| const maxTest = 10; | |
| while (true) { | |
| const buttons = document.querySelectorAll(".MuiTableCell-root.MuiTableCell-body.MuiTableCell-alignCenter.MuiTableCell-sizeMedium"); | |
| console.log(`Found ${buttons.length} buttons.`); | |
| if (buttons.length === 0) break; | |
| const button = buttons[0]; |
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 | |
| DB_USER="admin" | |
| DB_PASSWORD=$(openssl rand -base64 16) | |
| DB_NAME="connectors" | |
| DB_HOST=$(hostname -I | awk '{print $1}') | |
| # Ensure PostgreSQL listens on all interfaces | |
| configure_postgresql() { | |
| sudo sed -i "s/^#listen_addresses = 'localhost'/listen_addresses = '*'/" /var/lib/pgsql/data/postgresql.conf |
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 | |
| # Taken from: https://github.com/leerob/next-self-host/blob/main/deploy.sh | |
| # Env Vars | |
| POSTGRES_USER="myuser" | |
| POSTGRES_PASSWORD=$(openssl rand -base64 12) # Generate a random 12-character password | |
| POSTGRES_DB="mydatabase" | |
| SECRET_KEY="my-secret" # for the demo app | |
| NEXT_PUBLIC_SAFE_KEY="safe-key" # for the demo app |
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
| set -g default-terminal "screen-256color" | |
| unbind-key C-b | |
| set -g prefix C-Space | |
| bind-key C-Space send-prefix | |
| unbind % | |
| bind | split-window -h | |
| unbind '"' |
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 { createServer } = require("https"); | |
| const { parse } = require("url"); | |
| const next = require("next"); | |
| const fs = require("fs"); | |
| const port = 3000; | |
| // const dev = process.env.NODE_ENV !== "production"; | |
| const dev = false; | |
| const app = next({ dev }); | |
| const handle = app.getRequestHandler(); |
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
| "standard.options": { | |
| "ignore": [ | |
| "node_modules/**" | |
| ], | |
| "javascript.format.enable": false, | |
| "javascript.validate.enable": false, | |
| "standard.enable": true, | |
| "standard.autoFixOnSave": true, | |
| "standard.validate": [ | |
| "javascript", |
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
| "use strict"; | |
| const puppeteer = require("puppeteer"); | |
| const _ = require('lodash'); | |
| const log = data => console.log(data); | |
| async function autoScroll(page){ | |
| await page.evaluate(async () => { |
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
| [ | |
| { | |
| "date": "2020-09-30T09:15:00.000Z", | |
| "open": 21482.3, | |
| "high": 21514.75, | |
| "low": 21405.05, | |
| "close": 21468.9, | |
| "volume": 533150, | |
| "time": "Sep 30, 2020 2:45 PM", | |
| "hma": 21360.62454978355, |
NewerOlder