git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| const axios = require('axios'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const fs = require('fs'); | |
| const { promisify } = require('util'); | |
| const { Worker, isMainThread, parentPort, workerData } = require('worker_threads'); | |
| const NUM_WORKERS = 3; // Using 3 worker threads, leaving 1 core free | |
| const API_KEY = 'a48f0d74'; | |
| let logStream; | 
Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
| #!/bin/bash | |
| queues=( | |
| "queue-1" | |
| "queue-2" | |
| ) | |
| for i in "${queues[@]}" | |
| do | |
| aws --profile MY-PROFILE sqs get-queue-attributes --queue-url https://sqs.us-east-1.amazonaws.com/00000000000000000/$i --attribute-names ApproximateNumberOfMessages \ | |
| | grep ApproximateNumberOfMessage \ | 
| import json | |
| import os | |
| import boto3 | |
| # Using AWS_PROFILE and AWS_REGION to authenticate | |
| sqsResource = boto3.resource('sqs') | |
| queue = sqsResource.get_queue_by_name(QueueName=os.getenv('QUEUE_NAME')) | |
| output_dir = os.getenv('OUTPUT_DIR') | 
| git init | |
| git remote add origin PATH/TO/REPO | |
| git fetch | |
| git reset origin/master # Required when the versioned files existed in path before "git init" of this repo. | |
| git checkout -t origin/master | |
| https://stackoverflow.com/questions/2411031/how-do-i-clone-into-a-non-empty-directory | 
| DECLARE @name VARCHAR(50) -- database name | |
| DECLARE @path VARCHAR(256) -- path for backup files | |
| DECLARE @fileName VARCHAR(256) -- filename for backup | |
| DECLARE @fileDate VARCHAR(20) -- used for file name | |
| -- specify database backup directory | |
| SET @path = 'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup\' | |
| -- specify filename format | |
| SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) |