This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# usage (requires fswatch): `fswatch -o . | xargs -n1 -I{} ./bin/hot-reload.sh` | |
# usage (requires fsevents-tools): `while true; do notifywait ~/Projects/docsite; ./update.sh; done` | |
killall docsite | |
cd cmd/docsite | |
go get | |
cd - | |
docsite -config "../sourcegraph/doc/docsite.json" serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
sourcegraph: | |
image: sourcegraph/server:3.1.1 | |
environment: | |
- SRC_LOG_LEVEL=dbug | |
ports: | |
- 80:7080 | |
- 443:7080 | |
- 2633:2633 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version that excludes Sourcegraphers and prints a markdown list with hyperlinks. | |
// Commented out code was experimenting with printing contributors for each relevant repository but as some repositories don't have issues, it wasn't used. | |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A page can have multiple editors that each have their own document, e.g. a PR. | |
{ | |
"uri": "git://github.com/django/django?d6eaf7c0183cd04b78f2a55e1d60bb7e59598310#django/__init__.py", | |
"languageId": "python", | |
"text": "from django.utils.version import get_versionVERSION = (2, 0, 0, 'alpha', 0)__version__ = get_version(VERSION)def setup(set_prefix=True): \"\"\" Configure the settings (this happens as a side effect of accessing the first setting), configure logging and populate the app registry. Set the thread-local urlresolvers script prefix if `set_prefix` is True. \"\"\" from django.apps import apps from django.conf import settings from django.urls import set_script_prefix from django.utils.encoding import force_text from django.utils.log import configure_logging configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) if set_prefix: set_script_prefix( '/' if settings.FORCE_SCRIPT_NAME is None else force_text(settings.FORCE_SCRIPT_NAME) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"region": "us-gov-west-1", | |
"amis": [ | |
{ | |
"id": "ami-7e7aea1f", | |
"type": "amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs" | |
}, | |
{ | |
"id": "ami-3b48d85a", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
K8S_DASHBOARD_PORT=30000 | |
k8s-dashboard-up () { | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
until kubectl get pods --namespace=kube-system | grep kubernetes-dashboard &> /dev/null | |
do | |
sleep 1 |