Skip to content

Instantly share code, notes, and snippets.

View xtha's full-sized avatar
💭
k8s,openstack

zsh xtha

💭
k8s,openstack
  • China
  • 09:13 (UTC +08:00)
View GitHub Profile
@EudesSilva
EudesSilva / commons-proxy.sh
Last active January 7, 2025 03:52
Config proxy in Git, Yarn, Bower, NPM, Maven, Docker, Gradle, General
#Configuration Proxy
#Git
git config --global http.proxy http://<username>:<password>@<proxy-port>
git config --global https.proxy http://<username>:<password>@<proxy-port>
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@denji
denji / README.md
Last active October 19, 2025 11:13 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active October 27, 2025 14:28
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@ElijahLynn
ElijahLynn / pipe_to_docker_examples
Last active July 2, 2024 01:27
How to pipe to `docker exec` examples
# These examples assume you have a container currently running.
# 1 Pipe from a file
sudo docker exec --interactive CONTAINER_NAME /bin/bash < the_beginning.sh | tee the_beginning_output.txt`
#2a Pipe by piping
echo "echo This is how we pipe to docker exec" | sudo docker exec --interactive CONTAINER_NAME /bin/bash -
@vagelim
vagelim / event_env.sh
Last active January 30, 2019 10:14
Sets up a virtual environment, installs kombu, and runs the event listener
#!/bin/bash
# Requires pip
pip install virtualenv
virtualenv listener
listener/bin/pip install kombu
listener/bin/python openstackEvents.py
@vagelim
vagelim / openstackEvents.py
Last active July 30, 2020 15:16
Event notification listener for OpenStack
########################################
# Required changes to nova.conf #
########################################
# notification_driver=nova.openstack.common.notifier.rpc_notifier
# notification_topics = notifications
# notify_on_state_change = vm_and_task_state
# instance_usage_audit_period = hour
# instance_usage_audit = True
# default_notification_level = INFO
# notify_api_faults = true
@ezekg
ezekg / checklist.md
Last active January 23, 2024 03:09
Deployment Checklist

Deployment Checklist

Pre-Development

  • Hosting is set up with full control panel access and we have log in credentials
  • All email addresses are known for each form and all emails has been confirmed active
  • Person responsible for DNS switch knows client's current email management service and understands how to route the DNS

Post-Development

  • Person responsible for deployment has obtained SSH access to server
  • All required system packages have been installed on the server e.g. recent versions of php (greater than v5.4, if at all possible), mysql, git, wp-cli, magerun (if Magento project), openssl (if https), rsync, etc.
@jeanlescure
jeanlescure / README.md
Last active October 8, 2025 17:58
Ubuntu/Debian Offline Repository Creation

Ubuntu/Debian Offline Repository Creation Gist

When I googled how to create my own offline repository of packages for use in an offline Ubuntu/Debian machine, the results were disheartening and the steps to be taken scattered all over the place.

The files within this gist will allow you to:

  • Download specific apt-get packages... with dependencies included!
  • Create a Packages.gz file so that you can add the repository folder you create to the target machine's /etc/apt/sources.list file.

Before using

@ju2wheels
ju2wheels / Dockerfile
Last active June 30, 2025 08:08
Docker Dockerfile reference template
# Last updated: 08/24/2916
#
# Total instructions available: 18
#
# https://docs.docker.com/engine/reference/builder/
#
# You can use a .dockerignore file in the same context directory as
# your Dockerfile to ignore files in the context before sending them
# to the Docker daemon for building to speed up building.