Skip to content

Instantly share code, notes, and snippets.

View sgoggins's full-sized avatar
Put me in, coach

Sean P. Goggins sgoggins

Put me in, coach
View GitHub Profile

SQL to extract the GitHub organization from a repository URL

SELECT distinct 
    substring(repo_git from 'github.com/([^/]+)/') as org_name
FROM
    repo
#!/bin/bash
find . -name ".DS_Store" -delete
## You're welcome
## Please tweet #AugurOfChaossRules
@sgoggins
sgoggins / server-stop-example.sh
Created July 2, 2021 18:51
Augur server stop example for several instances.
#!/bin/bash
cd augur-spos/
source ../virtualenv/augur-spos/bin/activate
git stash
git pull
augur backend stop
sleep 10
augur backend kill
deactivate
@sgoggins
sgoggins / server-start-example.sh
Created July 2, 2021 18:26
A sample script for systematically testing multiple instances
#!/bin/bash
rm -rf virtualenv/augur-spos
rm -rf virtualenv/augur-zephyr
rm -rf virtualenv/augur-unicef
rm -rf virtualenv/augur-census
rm -rf virtualenv/augur-indeed
rm -rf virtualenv/augur-howison
rm -rf virtualenv/augur-jenkins
rm -rf virtualenv/augur-osshealth
@sgoggins
sgoggins / bulk-neo4j-import-original.sh
Created December 7, 2017 20:53 — forked from jexp/bulk-neo4j-import-original.sh
Panama Papers Import Scripts for Neo4j
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
rm -rf $DATA
@sgoggins
sgoggins / bulk-neo4j-import-original.sh
Created December 7, 2017 20:53 — forked from jexp/bulk-neo4j-import-original.sh
Panama Papers Import Scripts for Neo4j
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
rm -rf $DATA
@sgoggins
sgoggins / research.md
Created November 27, 2017 14:48
CHAOSS Product Comparison Research

Last modified: 2017-11-27

Introduction

As the mission statement describes, the Linux Foundation Community Health Analytics for Open Source Software (CHAOSS) project aims to "produce integrated, open source software for analyzing software development", and "establish implementation-agnostic metrics for measuring community activity, contributions, and health".

To achieve this goal, our community members are defining which key metrics accurately evaluate the overall health of open-source projects. These metrics will serve as the measurements monitored by the product(s) developed by the CHAOSS community. In addition to this work, the following research provides a comparative analysis of the existing tools and/or production sites that currently provide health-related metrics for open-source projects using dashboard views.

Purpose

@sgoggins
sgoggins / research.md
Created November 27, 2017 14:48
CHAOSS Product Comparison Research

Last modified: 2017-11-27

Introduction

As the mission statement describes, the Linux Foundation Community Health Analytics for Open Source Software (CHAOSS) project aims to "produce integrated, open source software for analyzing software development", and "establish implementation-agnostic metrics for measuring community activity, contributions, and health".

To achieve this goal, our community members are defining which key metrics accurately evaluate the overall health of open-source projects. These metrics will serve as the measurements monitored by the product(s) developed by the CHAOSS community. In addition to this work, the following research provides a comparative analysis of the existing tools and/or production sites that currently provide health-related metrics for open-source projects using dashboard views.

Purpose

@sgoggins
sgoggins / postgres_queries_and_commands.sql
Created November 13, 2017 20:37 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@sgoggins
sgoggins / postgres_queries_and_commands.sql
Created November 13, 2017 20:37 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'