Skip to content

Instantly share code, notes, and snippets.

View hanleybrand's full-sized avatar

Peter Hanley hanleybrand

View GitHub Profile
@hanleybrand
hanleybrand / crewmate.json
Last active March 24, 2024 16:06
Your Starbound Crew: How to fix the first crew member spawner - probably is the same for every one.
{
"type" : "crewmate",
"disableWornArmor" : true,
"scripts" : [
"/npcs/main.lua",
"/scripts/pathing.lua",
"/npcs/timers.lua",
"/scripts/sensors.lua",
@hanleybrand
hanleybrand / canvas_data_dap_custom_download_names.py
Last active February 10, 2024 21:35
Importing instructure-dap-client and using it programatically - quickstart example scripts
import os
from pathlib import Path
import shutil
from urllib.parse import urlparse
from dap.api import DAPClient
from dap.dap_types import Format, IncrementalQuery, SnapshotQuery
import requests
output_dir_base = Path("downloads")
@hanleybrand
hanleybrand / lostcities_assets_diagram.md
Created December 4, 2023 20:50
lost cities asset system interrellation chart
classDiagram;
    LostCitiesProfile --> worldstyle;
    LostCitiesProfile --> style;
    worldstyle --|> style;
    worldstyle "1" o--|> "*" citystyle
    worldstyle --|> "1" scattered

    citystyle --> style
    citystyle --> citystyle
@hanleybrand
hanleybrand / lostcities_assets_diagram.md
Created December 4, 2023 20:48
lost cities asset system interrellation chart
classDiagram;
    LostCitiesProfile --> worldstyle;
    LostCitiesProfile --> style;
    worldstyle --|> style;
    worldstyle "1" o--|> "*" citystyle
    worldstyle --|> "1" scattered

    citystyle --> style
    citystyle --> citystyle
@hanleybrand
hanleybrand / lostcities_assets_diagram.md
Created December 4, 2023 20:47
lost cities asset system interrellation chart
classDiagram;
    LostCitiesProfile --> worldstyle;
    LostCitiesProfile --> style;
    worldstyle --|> style;
    worldstyle "1" o--|> "*" citystyle
    worldstyle --|> "1" scattered

    citystyle --> style
    citystyle --> citystyle
@hanleybrand
hanleybrand / lostcities_assets_diagram.md
Created December 4, 2023 20:47
lost cities asset system interrellation chart
graph classDiagram
    LostCitiesProfile --> worldstyle
    LostCitiesProfile --> style
    worldstyle --|> style
    worldstyle "1" o--|> "*" citystyle
    worldstyle --|> "1" scattered

    citystyle --> style
    citystyle --> citystyle
@hanleybrand
hanleybrand / lostcities_assets_diagram.md
Created December 4, 2023 20:45
lost cities asset system interrellation chart
classDiagram
    LostCitiesProfile --> worldstyle
    LostCitiesProfile --> style
    worldstyle --|> style
    worldstyle "1" o--|> "*" citystyle
    worldstyle --|> "1" scattered

    citystyle --> style
    citystyle --> citystyle

Common Queries for Beginners

December 17, 2010 12:01 PM

Hello Everyone. Below is a list of common queries a gentlemen at Blackboard Managed Hosting gave me a while back. This list of queries is a great starting point to get to know the ASR side of Blackboard. There are a few things you need to be aware of before copying and pasting these into your favorite query analyzer:

Aqua Data Studio does not end its statements with semicolons like this ;

Some queries may not work without modification.

@hanleybrand
hanleybrand / clean_attrs.py
Last active February 12, 2023 04:38
Remove unwanted attributes from tags in HTML snippets with BeautifulSoup (3.21 - might work with BS4)
from BeautifulSoup import BeautifulSoup
def clean(html):
whitelist = ['backColor', 'backcolor', 'bgcolor',
'color', 'fg', 'fontName', 'fontSize',
'fontname', 'fontsize', 'href', 'name',
'textColor', 'textcolor']
html.attrs = None
for e in html.findAll(True):
for attribute in e.attrs:
@hanleybrand
hanleybrand / sqlsrv_create_lti2apps.sql
Last active January 26, 2023 14:45
Create MS SQL Server tables (lti2_*) for LTI-Tool-Provider-Library-PHP https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP
-- creates the tables necessary to use the LTI provider library for SQL Server (tested against SQL Server 12.0.5540.0 (2014 Service Pack 2)
-- see [https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP](LTI-Tool-Provider-Library-PHP)
CREATE TABLE lti2_consumer
(
consumer_pk INT IDENTITY (1, 1) PRIMARY KEY NOT NULL,
name VARCHAR(50) NOT NULL,
consumer_key256 VARCHAR(256) NOT NULL,
consumer_key TEXT NULL,
secret VARCHAR(1024) NOT NULL,