Skip to content

Instantly share code, notes, and snippets.

@m1yag1
m1yag1 / group_vars.yml
Last active April 10, 2024 21:59
Ansible tasks to setup GCSv5 for testing
# gcsv5-setup
globus_organization: Mike A.
globus_users:
- user: mike.a
group: mike.a
globus_contact_email: mike.a@globus.org
globus_domain: globus.org
globus_owner: "{{ vault_globus_owner }}"
globus_project_id: "{{ vault_globus_project_id }}"
gcs_cli_client_id: "{{ vault_gcs_cli_client_id }}"
@m1yag1
m1yag1 / gist:30bd9ed497f65bcb7d554f1f0ee086cb
Created March 22, 2024 18:55 — forked from trongthanh/gist:2779392
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@m1yag1
m1yag1 / migrate_zenhub_issues.py
Last active February 14, 2023 18:27
Migrate Issues from ZenHub to GH Projects
# We first create a spreadsheet with the ZenHub Pipeline and GitHub Project Column mapping
# Then, we moved all the issues manually into an "Unsorted" column in our GitHub Project
# Read through each of the issues that is in the Unsorted column and move them to the correct column
# if it's in the spreadsheet.
# To run:
# pip install python-dotenv ghzh-clients
import csv
import os
@m1yag1
m1yag1 / traefik_redirect.yml
Last active March 20, 2022 01:49
A docker stack configuration to setup redirects using traefik 1.7 reverse proxy.
# Save this to a file called traefik-redirect.yml
# docker stack deploy --compose-file traefik_redirect.yml traefik_redirect
version: "3.7"
networks:
traefik-public:
external: true
name: traefik-public
services:
# This is spun up as a "dummy" service. We redirect to another location.
staging:
@m1yag1
m1yag1 / get-latest-sha.yml
Created September 4, 2021 01:20
Get the latest sha for a git repo within a Concourse task
---
platform: linux
image_resource:
type: registry-image
source:
password: ((ce-dockerhub-token))
repository: alpine/git
username: ((ce-dockerhub-id))
inputs:
- name: source-code
@m1yag1
m1yag1 / development.env
Last active March 20, 2020 15:02
editoria development.env
export PUBSWEET_SECRET='asecretsecretnotreally'
export POSTGRES_USER='dev'
export POSTGRES_PASSWORD='secretpassword'
export POSTGRES_HOST='0.0.0.0'
export POSTGRES_DB='editoria_dev'
export POSTGRES_PORT='5432'
export SERVER_PORT='3000'
export INK_ENDPOINT='http://167.99.161.30:3000/'
export INK_USERNAME='admin@admin.com'
export INK_PASSWORD='abc12345'
@m1yag1
m1yag1 / python_slack_theme.txt
Created February 13, 2020 21:20
python theme for slack
#306998,#FFD43B,#FFD43B,#7F7F7F,#5A9FD4,#F4F4F4,#FFE873,#FFD43B
@m1yag1
m1yag1 / double_barrel_selenium.py
Last active July 16, 2019 20:35
A script that will open two selenium browsers in order to compare two URLS. Accepts PASS and FAIL values and writes to csv
import csv
import os
import sys
from datetime import datetime
from selenium import webdriver
HERE = os.path.abspath(os.path.dirname(__file__))
@m1yag1
m1yag1 / archive_xpath_search.py
Last active July 10, 2019 17:07
archive_xpath_search
import csv
import os
import urllib
from datetime import datetime
# pip install requests
import requests
HERE = os.path.abspath(os.path.dirname(__file__))
@m1yag1
m1yag1 / testrail_gh_import.py
Last active September 14, 2018 19:48
Import a csv export of TestRail test cases into GitHub as user stories
import csv
import os
from datetime import datetime
# Requires pip install github3.py
from github3 import login
# Requires pip install jinja2
from jinja2 import Template