Skip to content

Instantly share code, notes, and snippets.

View kolinkorr839's full-sized avatar

Kolin Korr kolinkorr839

View GitHub Profile
@kolinkorr839
kolinkorr839 / Update-branch.md
Created February 5, 2023 17:38 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

/* Get currently running transactions */
select * from information_schema.innodb_trx
/* Get currently running transactions where tables in use */
select * from information_schema.innodb_trx where trx_tables_in_use = 1
/* show locked tables */
show open tables where in_use > 0 ;
SHOW ENGINE INNODB STATUS;
@kolinkorr839
kolinkorr839 / how-to-re-idex-auto-increment-id.sql
Created August 14, 2022 14:05 — forked from akirattii/how-to-re-idex-auto-increment-id.sql
[MySQL] How to re-index auto_increment id of a table to make use of resting sequence ids when it reached its max limit.
--
-- How to re-index the auto_increment id.
--
-- 0) Create an original table:
CREATE TABLE `hoge` (
`id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
@kolinkorr839
kolinkorr839 / okta_flask_oidc_auth_example_with_pkce.py
Created November 12, 2021 17:24 — forked from cleavenworth/okta_flask_oidc_auth_example_with_pkce.py
This is a sample Python 3 app that hosts an OIDC app with Flask to authenticate against Okta and run example calls against the new Okta OAuth-scoped APIs. This example can also be used to host authentication for an OIDC webapp that does not use the OAuth API scopes. This was created with an MVP in mind as an example to demonstrate the ease of in…
#!/usr/bin/env python3
"""This is a sample Python 3 app that hosts an OIDC app with Flask to
authenticate against Okta and run example calls against the new Okta OAuth-scoped APIs.
This example can also be used to host authentication for an OIDC webapp that does not use
the OAuth API scopes.
This was created with an MVP in mind as an example to demonstrate the ease of interacting
with Okta's Authroization Code flow and should not be used in production without
additions to error/state-handling and strong scrutiny."""
@kolinkorr839
kolinkorr839 / selenium_page.py
Created October 27, 2021 16:40 — forked from pamelafox/selenium_page.py
Selenium Utility Funcs
from selenium.common.exceptions import NoSuchElementException, TimeoutException, WebDriverException
class SeleniumPage(object):
driver = None
waiter = None
def open_page(self, url):
self.driver.get(url)
@kolinkorr839
kolinkorr839 / show_progress.md
Created October 14, 2021 00:15 — forked from fladd/show_progress.md
Show the progress of a process with a simple text-based progress bar

show_progress

Show the progress of a process with a simple text-based progress bar

Code

def show_progress(progress, info="", length=40, symbols="[= ]", decimals=1):
    """Show the progress of a process with a simple text-based progress bar.

    Parameters
    ----------
@kolinkorr839
kolinkorr839 / Terraform nested for loop
Created August 11, 2021 14:22 — forked from arehmandev/Terraform nested for loop
Terraform nested for loop for_each
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
map_output = {
"1-a-4-d" = {
"1" = "1"
"2" = "a"
"3" = "4"
"4" = "d"
}
variable "subnets" {
type = list(any)
default = ["subnet-a", "subnet-b", "subnet-c"]
}
variable "instances" {
default = {
TEST1 = {
sg = ["example1"]