Skip to content

Instantly share code, notes, and snippets.

Ryan Blunden ryan-blunden

Block or report user

Report or block ryan-blunden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ryan-blunden / repos.jsonc
Created Jun 4, 2019
Good mix of repositories for testing a Sourcegraph instance
View repos.jsonc
"repos": [
"sourcegraph/sourcegraph", // Mix
"sourcegraph/deploy-sourcegraph", // YAML
"jenkinsci/jenkins", // Java
"getsentry/sentry", // Python
"moby/buildkit", // Go
"pallets/flask", // Python
"googleapis/gapic-generator", // Java
"Azure/azure-storage-js", // TypeScript
ryan-blunden / nginx.conf
Created May 13, 2019
NGINX conf for lang servers with basic auth
View nginx.conf
# This config was generated by Sourcegraph.
# You can adjust the configuration to add additional TLS or HTTP features.
#
error_log stderr;
pid /var/run/;
# Do not remove. The contents of sourcegraph_main.conf can change between
# versions and may include improvements to the configuration.
include nginx/sourcegraph_main.conf;
ryan-blunden / docker-compose.yml
Created May 13, 2019
Docker Compose for lang servers
View docker-compose.yml
version: '3'
container_name: sourcegraph
image: sourcegraph/server:3.2.0
- ''
- 443:7080
ryan-blunden /
Last active May 3, 2019
WIP Python script for generating the nav for Once fully baked, it will be ported to Go and greatly improved.
#!/usr/bin/env python3
from __future__ import annotations
from dataclasses import dataclass, field
import inspect
import os
import re
import sys
from typing import List
ryan-blunden /
Last active Mar 27, 2019
Sourcegraph with language servers behind SSL with basic auth
# Execute settings to insert lang server settings
docker container exec sourcegraph /bin/bash -c 'cat /var/opt/sourcegraph/settings_init.sql | psql -U postgres sourcegraph'
# Execute psql commands
docker container exec sourcegraph /bin/bash -c 'echo "SELECT * FROM settings;" | psql -U postgres sourcegraph'
#!/usr/bin/env bash
# usage (requires fswatch): `fswatch -o . | xargs -n1 -I{} ./bin/`
# usage (requires fsevents-tools): `while true; do notifywait ~/Projects/docsite; ./; done`
killall docsite
cd cmd/docsite
go get
cd -
docsite -config "../sourcegraph/doc/docsite.json" serve
#! /usr/bin/env bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ~/.sourcegraph/config/sourcegraph.key -out ~/.sourcegraph/config/sourcegraph.crt -subj "/CN=localhost
View mermaid.css
* Placeholder for required styles to correctly render exported Mermaid SVG files from the online live editor
/* Number in below styles is unique for each export */
#mermaid-1551921004212 .label {
font-family: 'trebuchet ms', verdana, arial;
color: #333;
font-size: 14px;
ryan-blunden / docker-compose.yml
Last active Feb 25, 2019
Docker Compose example for Sourcegraph with the Go language server
View docker-compose.yml
version: "3"
image: sourcegraph/server:3.1.1
- 80:7080
- 443:7080
- 2633:2633
ryan-blunden /
Created Feb 7, 2019
Testing Sourcegraph 3.0 db upgrade
#!/usr/bin/env bash
set -xeuo pipefail
export OLD=${OLD:-"9.6"}
export NEW=${NEW:-"11"}
export SRC_DIR=${SRC_DIR:-"$HOME/.sourcegraph"}
docker run \
-w /tmp/upgrade \
You can’t perform that action at this time.