Skip to content

Instantly share code, notes, and snippets.

View blade2005's full-sized avatar

Craig Davis blade2005

View GitHub Profile
@blade2005
blade2005 / gist:b9eeccf4fd18773b4ceab03799885610
Created January 8, 2024 23:48
watch the most recent run on the main branch
gh run watch $(gh run list -b main -L 1 --json databaseId -q .[0].databaseId)
@blade2005
blade2005 / gist:cc30bf9319c672234b8b93fd02b3e5e2
Created January 4, 2024 19:35
jsonschema-taskfile-defer-bug
Traceback (most recent call last):
File "/home/cdavis/.local/pipx/.cache/89c8e8a74b4c6a1/bin/check-jsonschema", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/cdavis/.local/pipx/.cache/89c8e8a74b4c6a1/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cdavis/.local/pipx/.cache/89c8e8a74b4c6a1/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
@blade2005
blade2005 / README.md
Last active January 30, 2023 17:40
My Test 2
@blade2005
blade2005 / README.md
Last active January 30, 2023 17:48
My Test
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJcniUGavP7kbpertU/MKAcJL0O+PueCxIiCWomxZuUV stoney@platypus
$ cdktf --help
/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cdktf.js:42
`))};a.once("error",l=>{throw c(`jsii compilation failed. error: ${l.message}`)}),a.once("exit",l=>l===0?n():i(c(`jsii compilation failed with non-zero exit code: ${l}`)))})}Je.exec=dz;function pz(t){var e,r,n,i;if((e=t.python)===null||e===void 0?void 0:e.moduleName.includes("-"))throw new Error(`Python moduleName [${t.python.moduleName}] may not contain "-"`);if((r=t.java)===null||r===void 0?void 0:r.package.includes("-"))throw new Error(`Java package [${t.java.package}] may not contain "-"`);if((n=t.csharp)===null||n===void 0?void 0:n.namespace.includes("-"))throw new Error(`C# namespace [${t.csharp.namespace}] may not contain "-"`);if((i=t.golang)===null||i===void 0?void 0:i.moduleName.includes("_"))throw new Error(`Go module name [${t.golang.moduleName}] may not contain "_"`)}Je.validateOptions=pz});var Px=m(Ft=>{"use strict";var hz=Ft&&Ft.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,
@blade2005
blade2005 / blueprint.py
Last active April 23, 2021 15:34
CFNGin Blueprint Template
"""Blueprint for creating/registering ssm automations."""
from runway.cfngin.blueprints.base import Blueprint as CFNGinBlueprint
from runway.cfngin.blueprints.variables.types import CFNString
# from troposphere import GetAtt, Output, Ref, resourcegroups, ssm
TEMPLATE_DESCRIPTION = 'Systems Manager Automation'
class Blueprint(CFNGinBlueprint):
#!/usr/bin/env python3
import argparse
import datetime
import json
import logging
import os
import pickle
import sys
import time
from json import JSONEncoder
require 'date'
def created_at(time_entry)
DateTime.strptime(time_entry['created_at']).to_time.to_i
end
def day_before(timestamp)
timestamp - (24 * 60 * 60)
end
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import selenium
import os
import time
import logging
import requests
import os.path
import json
from multiprocessing.dummy import current_process, Pool