Skip to content

Instantly share code, notes, and snippets.

View Xuanwo's full-sized avatar
🔥
I'm working from the Earth.

Xuanwo Xuanwo

🔥
I'm working from the Earth.
View GitHub Profile
@Xuanwo
Xuanwo / PackageControInstall
Created June 3, 2014 17:37
Sublime Text 3的包管理插件
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
@Xuanwo
Xuanwo / SharedMount.php
Created December 12, 2016 14:42
SharedMount on my server
<?php
/**
* @author Björn Schießle <bjoern@schiessle.org>
* @author Joas Schilling <nickvergessen@owncloud.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <icewind@owncloud.com>
* @author Roeland Jago Douma <rullzer@owncloud.com>
*
* @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
@Xuanwo
Xuanwo / qingstor-sdk-on-meteor.js
Created March 31, 2017 05:57
qingstor-sdk on meteor demo
import { QingStor, Config } from 'qingstor-sdk';
import './main.html';
let config = new Config();
let qingstor = new QingStor(config);
let bucket = qingstor.Bucket("test", "pek3a");
console.log(qingstor);
console.log(bucket);
@Xuanwo
Xuanwo / client.html
Created April 6, 2017 16:40
Browser Demo
<head>
<title>Upload</title>
</head>
<body>
<div class="container">
<header class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/">Upload</a>
</div>
</header>
@Xuanwo
Xuanwo / client.html
Created April 7, 2017 06:54
put object with browser
<head>
<title>Upload</title>
</head>
<body>
<div class="container">
<header class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/">Upload</a>
</div>
</header>
@Xuanwo
Xuanwo / post-object-anoymous.html
Last active June 15, 2017 20:09
从浏览器端向 QingStor 对象存储上传文件
<!DOCTYPE html>
<html>
<body>
<h3>Upload</h3>
<form id="upload" action="https://<bucket>.<zone>.qingstor.com" method="POST"
enctype="multipart/form-data">
<span>Click or Drag a File Here to Upload</span>
<input type=hidden name="key" value="<key>" />
<input type=file name="file" />
{"sig":"1025f87a146e872e7c61079a167981e47e71d42a91f23b56eede873e5b3adb012dffcf406dbd05f11be402937371b90743a61643554647c942256e50396635a61","msghash":"8afa02c79989cb22c82fc4d29ed5d42f5bf40422b166593fe388f79e8a85fa44"}
--- pkgbuild 2018-04-27 14:59:37.114327496 +0800
+++ pkgbuild.new 2018-04-27 15:00:25.491564539 +0800
@@ -5,7 +5,7 @@
pkgrel=1
_modname="${pkgname#nginx-mainline-mod-}"
-_nginxver=1.13.10
+_nginxver=1.13.12
pkgdesc='Lua script engine module for mainline nginx'

Keybase proof

I hereby claim:

  • I am xuanwo on github.
  • I am xuanwo (https://keybase.io/xuanwo) on keybase.
  • I have a public key ASBXke9iVcylLBoOITVkFK3HTbzlGddlQBynNytA4wQEsAo

To claim this, I am signing this object:

:) diff `which phpstorm` `which goland`
4c4
< # PhpStorm startup script.
---
> # GoLand startup script.
10c10
< TITLE="Cannot start PhpStorm"
---
> TITLE="Cannot start GoLand"
60c60