Skip to content

Instantly share code, notes, and snippets.

View life-efficient's full-sized avatar
💭
Working hard

Harry Berg life-efficient

💭
Working hard
View GitHub Profile
@msrose
msrose / combining-git-repositories.md
Last active July 8, 2024 16:41
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@olegdulin
olegdulin / 00_helloWorld.py
Created April 16, 2016 11:23
Write a "Hello World" into an AWS CloudWatch Logs service
#!/usr/local/bin/python3
import boto3
import time
logs = boto3.client('logs')
LOG_GROUP='TUTORIAL-DEV2'
LOG_STREAM='stream1'
@davidmroth
davidmroth / Conversation Settings
Last active June 15, 2024 16:10
Custom GPTs OAuth Settings and API for Google Sheets
Converstations Starter: Create a new project: Type: Project, Assignee: John, Category: Job
Instructions (appended to your exsting instructions): When a project data is provided, please update Google Sheets ID: `<sheet id>` using `sheets.spreadsheets.values.append` api call with the information provided and starting at range: `Sheet1!A2`, and continue adding rows as needed.
NOTE: How to find the Google Sheet ID - https://stackoverflow.com/questions/36061433/how-do-i-locate-a-google-spreadsheet-id