Skip to content

Instantly share code, notes, and snippets.

View windhamwong's full-sized avatar
🐒
Déjà vu

Windham (DrKN) Wong windhamwong

🐒
Déjà vu
  • Frontshop Co.
  • Hong Kong
View GitHub Profile
# This will use osd.5 as an example
# Fork from: https://gist.github.com/cheethoe/49d9c1d0003e44423e54a060e0b3fbf1
# ceph commands are expected to be run in the rook-toolbox
1) disk fails
2) remove disk from node
3) mark out osd. `ceph osd out osd.5`
4) remove from crush map. `ceph osd crush remove osd.5`
5) delete caps. `ceph auth del osd.5`
6) remove osd. `ceph osd rm osd.5`
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5`
@windhamwong
windhamwong / elasticsearch_update_by_query_6.2.es
Created August 22, 2018 06:54
Reference of update by query adding tag into doc
GET /<something>/_update_by_query?pretty
{
"query": {
"bool": {
"must_not": [
{
"match_phrase": {
"tags.keyword": {
"query": "parsed"
}
@windhamwong
windhamwong / ALTERNATIVES.adoc
Created February 9, 2018 07:18 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
#twRO 09062016
[台灣 - GNJoy]
ip 218.32.4.151
port 6900
master_version 5
version 211
serverType twRO
serverEncoding Big5
charBlockSize 144
storageEncryptKey 0x050B6F79, 0x0202C179, 0x00E20120, 0x04FA43E3, 0x0179B6C8, 0x05973DF2, 0x07D8D6B, 0x08CB9ED9
#cloud-config
users:
- name: "<<USERNAME>>"
passwd: "<<PASSWORD>>"
groups:
- "sudo"
- "docker"
coreos:
etcd2:
@windhamwong
windhamwong / list-dict_in_tastypie.MD
Last active November 17, 2015 20:24
List-Dict field programming guide for Tastypie with MongoDB

#Introduction:

When working with MongoDB, list and dict objects are often used for storing dynamic size of data. However, the original tastypie and DRF do not support serialising these fields into JSON. Thus, some overriding functions are required in order to make them work. This gist presents the guideline for how to handle list objects in Django using Tastypie.

Requirement:

  1. Django-nonrel
  2. djangotoolbox
  3. django-mongodb-engine
  4. tastypie
  5. MongoDB 3