Skip to content

Instantly share code, notes, and snippets.

@kyhau
kyhau / create_file_hosting_endpoint_on_linux.sh
Created June 14, 2017 23:47
This script is for creating file hosting endpoint on a linux machine.
!#/bin/bash
# This script is for creating file hosting endpoint on a linux machine.
NEW_FILESTORE_NAME=xxxfiles # (e.g. user1files)
NEW_USER=xxx # (e.g. user)
NEW_PASS=xxx # passowrd for NEW_USER
DOMAIN=example.com
set -e
@kyhau
kyhau / USING-VAULT.md
Created March 23, 2017 05:19 — forked from voxxit/USING-VAULT.md
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@kyhau
kyhau / PyInstallerNotes.md
Last active March 6, 2016 21:20
PyInstaller

PyInstaller Notes

FileGDB

Include additional dlls required by FileGDB

Add the following in the .spec file

a.binaries += [('msvcp100.dll', 'C:\\Windows\\System32\\msvcp100.dll', 'BINARY'),
@kyhau
kyhau / Mercurial.md
Created March 1, 2016 10:43
Mercurial with Largefile extension

Mercurial with Largefile extension

E.g. Repo root: /var/lib/mercurial-server/repos

Enable Mercurial Largefile extension

  1. Go to your home directory (C:\Users<username> on Windows)
  2. Edit the mercurial config file (mercurial.ini on windows, .hgrc on linux)
  3. If no [extensions] section exists in the config file, add it
  4. In the [extensions] section, add the line largefiles = .

To build a Docker image depending on another image from Docker registry.

Edit "/etc/default/docker"

DOCKER_OPTS="--insecure-registry <docker registry url>"

Restart docker service

@kyhau
kyhau / Celery-Rabbitmq.md
Created March 1, 2016 10:29
Celery and Rabbitmq

Celery and Rabbitmq

How to config Celery with rabbitmq to creates one queue instead of multiple queues?

When you use amqp as result backend, it will create a new temporary queue for every result corresponding to each tasks that worker consumes. If you are not interested in the result, you can try CELERY_IGNORE_RESULT = True setting.

The temporary queue will last for 24 hours by default. You can try setting CELERY_TASK_RESULT_EXPIRES= for that.

For details see ext-link

@kyhau
kyhau / devpiNotes.md
Last active October 2, 2023 21:01
devpi Quick Start Guide

devpi Quick Start Guide

For details see Quickstart: uploading, testing, pushing releases

How to add the devpi index to your pip configuration file

Update C:\Users\username\pip\pip.ini on Windows 8/10, or ~/.config/pip/pip.conf on Linux

[global]
@kyhau
kyhau / devpiServerUpgrade.md
Last active October 21, 2019 06:36
devpi-server Upgrade

devpi-server Upgrade

# Login to the devpi registry server

$ sudo su devpi

# change to home directroy
cd ~
  
@kyhau
kyhau / RabbitmqUpgrade.md
Last active March 1, 2016 10:25
Rabbitmq Upgrade