Skip to content

Instantly share code, notes, and snippets.

View ismisepaul's full-sized avatar

Paul McCann ismisepaul

View GitHub Profile
version: '3.7'
#####################################################
# This Docker Compose file contains two services
# Dependency-Track API Server
# Dependency-Track FrontEnd
# Postgres Database
# Adminer Database Management UI
#####################################################
@ismisepaul
ismisepaul / github-user-permission-repo.sh
Created September 9, 2024 19:54
Add or Update GitHub Role for a user on multiple repos
repos=(
"my-org-repo1"
"my-org-repo2"
)
for repo in "${repos[@]}"
do
gh api --method PUT /repos/<ORG>/$repo/collaborators/<USERNAME> -f permission=write --silent
done
import copy
import hashlib
import json
import os
import sys
from datetime import datetime, timezone, timedelta
import elasticsearch
import elastic_transport
import requests
@ismisepaul
ismisepaul / github-repo-languages.py
Last active December 20, 2022 21:49
Get organisation repos with languages in use and last commit date. Filter out any that are archived or forks, and if the last commit date is > 3 months. Generate a count of the lines of code from each language based on the filtered set.
import json
import sys
from collections import defaultdict
from datetime import datetime
import requests
from requests.auth import HTTPBasicAuth
from loguru import logger
@ismisepaul
ismisepaul / whatsapp-webapp.desktop
Last active September 7, 2020 17:38
WhatsApp Ubuntu .desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
#Put this file in /usr/share/applications/
Name=WhatsApp
GenericName=WhatsApp
Comment=WhatsApp desktop webapp
#Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://*.whatsapp.com/* --user-agent-string='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.44' https://web.whatsapp.com %u
Exec=/opt/google/chrome/google-chrome --app=https://web.whatsapp.com/
Terminal=false
Type=Application
FROM ubuntu:latest
CMD ["/bin/sh"]
@ismisepaul
ismisepaul / scw_api.py
Last active January 24, 2020 17:40
Python API Wrapper for Secure Code Warrior
#!/usr/bin/env python3
"""
Python wrapper for the Secure Code Warrior API
"""
import urllib.request
import json
import re
from enum import Enum
### Keybase proof
I hereby claim:
* I am ismisepaul on github.
* I am ismisepaul (https://keybase.io/ismisepaul) on keybase.
* I have a public key ASDYBXpGzP_gJ88bQ8TwVH31TYRJkI1ZT01xHcEc0mKX2go
To claim this, I am signing this object: