Skip to content

Instantly share code, notes, and snippets.

my jar

http://xpra.org/

cd /etc/yum.repos.d/
curl -O https://winswitch.org/downloads/CentOS/winswitch.repo
yum install xpra


#启动一个X会话
@joke-lee
joke-lee / setupstorageclassenv.md
Created November 30, 2018 01:10
setupstorageclassenv

run vstart

git clone https://github.com/yehudasa/ceph.git
cd ceph
git checkout -b storage_class origin/wip-rgw-tiering-3
./install-deps.sh
./do_cmake.sh
make vstart
@joke-lee
joke-lee / setandlist.md
Created November 26, 2018 07:21
并发上传对象带属性的时候同时并发list会导致有些对象属性没有设置上
add in ceph.conf
rgw_swift_custom_header = HTTP_ONESTSWIFT
# -*- coding: utf-8 -*-
import sys
import swiftclient
user = 'user1:swift'
rgw-period.stp

probe begin {
  printf("ready\n");
}

global indent = 4;
probe process("/home/onest/ceph/build/bin/radosgw-admin").function("RGWPeriod::*").call {
  printf("%s -> %s: %s\n", thread_indent(indent), ppfunc(), $$parms);
@joke-lee
joke-lee / 1.xml
Last active October 10, 2018 07:51
<NotificationConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TopicConfiguration><Id>test</Id><Topic>arn:aws:sns:us-west-2:444455556666:sns-topic-xyz</Topic><Event>s3:ObjectCreated:Post</Event><Event>s3:ObjectRemoved:Delete</Event><Filter><S3Key><FilterRule><Name>Preifx</Name><Value>df</Value></FilterRule></S3Key></Filter></TopicConfiguration><TopicConfiguration><Id>test1</Id><Topic>arn:aws:sns:us-west-2:444455556666:sns-topic-xyz</Topic><Event>s3:ObjectCreated:Put</Event><Filter><S3Key><FilterRule><Name>Prefix</Name><Value>test</Value></FilterRule><FilterRule><Name>Suffix</Name><Value>.jpg</Value></FilterRule></S3Key></Filter></TopicConfiguration></NotificationConfiguration>
@joke-lee
joke-lee / bitsend_download.sh
Last active September 22, 2018 09:50
bitsend_download.sh
#!/bin/bash
DOWNLOAD_SERVER=https://${1}
FILEKEY=${2}
resolv_downpage(){
HTML="$(curl ${DOWNLOAD_SERVER}/download/${FILEKEY}.html -c /tmp/tmp_cookie)"
export DOWNADD=$(echo ${HTML} | grep -Po "'\/files\/.*?'" | awk -F \' '{print $2}')
export FILENAME=$(echo ${HTML} | grep -Po '<title>.*?</title>' | awk '{print $3}')
}
@joke-lee
joke-lee / delete_all_objects.py
Created September 3, 2018 13:17 — forked from seventhskye/delete_all_objects.py
A script to delete all objects, versions and delete markers from an s3 bucket.
#!/usr/bin/env python
import boto3
client = boto3.client('s3')
Bucket = 'a-bucket'
Prefix = 'a-prefix' # leave blank to delete the entire contents
IsTruncated = True
MaxKeys = 1000
KeyMarker = None
@joke-lee
joke-lee / all.md
Last active August 31, 2018 01:02
jewel rgw gtest

src/test/CMakeLists.txt

 # test_rgw_yly
  set(test_rgw_yly_srcs rgw/test_rgw_yly.cc)
  add_executable(test_rgw_yly
    ${test_rgw_yly_srcs}
    $<TARGET_OBJECTS:heap_profiler_objs>
    )
  target_link_libraries(test_rgw_yly
    rgw_a
@joke-lee
joke-lee / mobile-hls-video.html
Created July 30, 2018 05:31 — forked from ufologist/mobile-hls-video.html
Web 前端如何播放 HLS(.m3u8) 视频
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mobile HLS video</title>
</head>
<body>
<h1>Mobile HLS video</h1>