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 / 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 / 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 / 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 / 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 / G++.sublime-build(linux)
Last active February 14, 2024 12:13
用于在Sublime Text 3基础上构建C/C++IDE,Linux下
{
"cmd": ["g++", "${file}", "-std=c++11", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd":["gnome-terminal", "-x", "bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}' ;read -n1 -p 'press any key to continue.'"]
@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 / G++.sublime-build(windows)
Last active April 7, 2020 08:33
用于在Sublime Text 3基础上构建C/C++IDE,Windows下
{
"cmd": ["g++", "${file}", "-std=c++11", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,
"encoding":"cp936",
"variants":
[
{