Skip to content

Instantly share code, notes, and snippets.

View nickdbush's full-sized avatar

Nick Bush nickdbush

View GitHub Profile
2024-11-13 14:49:50,683 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.15.57 Python/3.12.7 Linux/6.5.0-1025-azure source/x86_64.alpine.3
2024-11-13 14:49:50,683 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'sync', '/files', 's3://spectinga-crawls-test', '--endpoint-url=http://s3:9090', '--no-sign-request', '--debug']
2024-11-13 14:49:50,701 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7f219a4cf560>
2024-11-13 14:49:50,701 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7f219a7e5e40>
2024-11-13 14:49:50,702 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>>
2024-11-13 14:49:50,702 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function ch
@nickdbush
nickdbush / generated.ts
Last active June 28, 2024 17:59
Better generated client
export type Response<Tag, Data = never> = {
tag: Tag;
data: Data;
};
const parseEmpty = <T>(tag: T) => (_: any): Response<T> => ({
tag,
data: null as never,
});
package altdata
import (
"context"
"github.com/google/uuid"
"golang.org/x/sync/errgroup"
)
type LoaderFn[Data any] func(ctx context.Context, ids []uuid.UUID) (map[uuid.UUID]Data, error)
@nickdbush
nickdbush / bookmarklet.js
Created December 16, 2020 01:55
Often videos on the Learn page at the University of Edinburgh are teeny-tiny for a reason which escapes most of us. Create a bookmark with the location set to the contents of bookmarklet.js and if you click it on a Learn page, it will maximise the space given to the videos. Alternatively, open up DevTools and paste it into the command line.
javascript: function resize() {
document.querySelectorAll(".kalturawrapper").forEach((wrapper) => {
wrapper.parentElement.style.width = "100%";
wrapper.parentElement.style.height = "unset";
wrapper.parentElement.style.maxWidth = "1000px";
wrapper.parentElement.style.maxHeight = "unset";
wrapper.style.width = "100%";
wrapper.style.height = "unset";
wrapper.style.maxWidth = "unset";
wrapper.style.maxHeight = "unset";
@nickdbush
nickdbush / README.md
Last active November 22, 2024 06:47
Superdesk installation instructions (Docker)

Archive only

I haven't looked at Superdesk in close to two years now (I no longer work at Sourcefabric) and I have little to no recollection of how to set it up. I'm leaving this gist online mainly for archival reasons and because there's a lot of useful information in the comments that I don't want to disappear from the internet. I hope you get it up and running one way or another, and if you do, please pop your solution here/make a new gist and link it here for others!

How to install Superdesk using Docker

  1. Install Docker
  2. Copy and paste docker-compose.yml in this gist into a blank folder (call it something like superdesk/)
  3. Open the folder in a terminal
  4. Run docker-compose up