Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@dasgoll
dasgoll / gist:d891fa03e2e10a0741da7ba57a96905b
Created July 15, 2024 07:04
Git - git-dir and worker-tree
DIR=flux-infra
git --git-dir=${DIR}/.git --work-tree=${DIR} status
@dasgoll
dasgoll / gist:8e400393bfb3d03d2ef8805769bda53d
Created April 22, 2024 07:46
Run mssql server as a docker container
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Str0ngPa$$w0rd' -p 1433:1433 -d mcr.microsoft.com/mssql/server
sqlcmd -S localhost -U sa -P 'Str0ngPa$$w0rd'
@dasgoll
dasgoll / gist:6cbc995f49adb2e901d24b0360a8ac03
Created April 7, 2024 05:59
lspci example find more info
root@sosbllxg08 # lspci | grep -i broad
03:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
04:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708S
Gigabit Ethernet (rev 12)
05:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
06:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708S
Gigabit Ethernet (rev 12)
root@sosbllxg08 # lspci -vn -s 04:00.0
04:00.0 0200: 14e4:16ac (rev 12)
@dasgoll
dasgoll / gist:958b2098ffe3d1b10c43814598f4ef0f
Created January 4, 2024 21:17
Use jq to urlencode a string
jq -rn --arg x 'café' '$x|@uri'
@dasgoll
dasgoll / gist:e80336eaa819c87dffb095a6d66836de
Created December 25, 2023 04:19
use jq to escape json
echo '{"foo": 0}' > foo.json
jq @json < foo.json
skopeo copy docker://nginx:1.16 docker://harbor.example.com/jay-test/nginx:1.16
skopeo copy docker://harbor.example.com/jay-test/nginx:1.25.3-alpine docker://registry.gitlab.com/dasgoll/myrepo/nginx:1.25
skopeo copy docker://651234438355.dkr.ecr.eu-central-1.amazonaws.com/keycloak:21.1210-1223 docker://61234392635.dkr.ecr.me-south-1.amazonaws.com/keycloak:21.1210-1223
@dasgoll
dasgoll / gist:04b59a077a1834b61cf179aeab513ae1
Last active December 12, 2023 07:26
install gitlab as a docker container
export GITLAB_HOME=~/gitlab
mkdir $GITLAB_HOME
docker run --detach \
--hostname gitlab.local.gd \
--publish 8080:80 \
--name gitlab \
--restart always \
@dasgoll
dasgoll / gist:e7e958618fd02ff2498f5297c8983bd8
Created November 16, 2023 22:25
xfreerdp connect and ignore cert
xfreerdp /cert:ignore /u:Administrator /v:192.168.1.82 /p:'let_me_in_dude' +home-drive
tags="TagSet=[{Key=Terraform,Value=false},{Key=Environment,Value=global} ]"
aws s3api put-bucket-tagging --bucket gitlab-upload-backup --tagging $tags
@dasgoll
dasgoll / gist:d3f3e374e5552f210c7e877756f91d46
Created November 12, 2023 01:27
sonarqube docker-compose.yaml
version: '2'
services:
sonarqube:
image: sonarqube
ports:
- '9000:9000'
networks:
- sonarnet
environment: