Skip to content

Instantly share code, notes, and snippets.

@lflfm
lflfm / gist:7012bf736c0eeefaa5c3286a710e7e97
Created October 7, 2018 00:19 — forked from monsur/gist:706839
Parses the response from XmlHttpRequest.getAllResponseHeaders() into a key/value pair.
/**
* XmlHttpRequest's getAllResponseHeaders() method returns a string of response
* headers according to the format described here:
* http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders-method
* This method parses that string into a user-friendly key/value pair object.
*/
function parseResponseHeaders(headerStr) {
var headers = {};
if (!headerStr) {
return headers;
@lflfm
lflfm / nginx-ssl-config
Created June 22, 2020 13:16 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@lflfm
lflfm / Sequelize Express Starter Guide.md
Last active May 12, 2021 16:22 — forked from clonn/README.md
Sequelize + Express + Migrations + Seed Starter

Subtree merges

This is an alternative to submodules:

This gives us a way to have a workflow somewhat similar to the submodule workflow without using submodules (which we will cover in Submodules). We can keep branches with other related projects in our repository and subtree merge them into our project occasionally. It is nice in some ways, for example all the code is committed to a single place. However, it has other drawbacks in that it’s a bit more complex and easier to make mistakes in reintegrating changes or accidentally pushing a branch into an unrelated repository.

Say you want to merge repository a into b. This can be accomplished with one command:

git subtree add --prefix=a ../a master
@lflfm
lflfm / git_surgery.md
Created September 7, 2022 15:33 — forked from fsmv/git_surgery.md
How to merge multiple git repos into one repo, and preserve history

Merging multiple git repos into one

tl;dr:

  1. Import other repos as branches
  2. Move the files in the other repos into subdirectories for each project
  3. Rebase the other repo branches onto the master
  4. Merge everything into master in order

Note: placeholders are in angle brackets.

@lflfm
lflfm / example.yml
Created October 18, 2022 08:04 — forked from cecilemuller/example.yml
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches: