Skip to content

Instantly share code, notes, and snippets.

View meteormatt's full-sized avatar

Liu Xing meteormatt

  • 上海
  • 09:45 (UTC +08:00)
View GitHub Profile
#!/bin/bash
# Interactive PoPToP install script on a OpenVZ VPS
# Tested on Debian 5, 6, and Ubuntu 11.04
# 2011 v1.1
# Author: Commander Waffles
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/
echo "######################################################"
echo "Interactive PoPToP Install Script for OpenVZ VPS"
echo "by Commander Waffles http://www.putdispenserhere.com"
@meteormatt
meteormatt / multipart.js
Created October 14, 2015 11:00
multipart.js
var fs = require('fs');
var ALY = require('aliyun-sdk');
var async = require('async');
var BufferHelper = require('bufferhelper');
var oss = new ALY.OSS({
accessKeyId: "你的accessKeyId",
secretAccessKey: "你的secretAccessKey",
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com',
apiVersion: '2013-10-15'
});
@meteormatt
meteormatt / DNS.md
Last active August 29, 2015 14:22
download.cdn.mozilla.net

###阿里DNS 223.5.5.5

~$ dig download.cdn.mozilla.net @223.5.5.5

; <<>> DiG 9.8.3-P1 <<>> download.cdn.mozilla.net @223.5.5.5
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40373
@meteormatt
meteormatt / Android: Be Together. Not the same.
Created October 29, 2014 03:22
Android: Be Together. Not the same.
Remember back in school, when you either invited the new kid over to your table or you didn't?
If you did, that was a cool move.
That was an and move.
And moves take guts, but they can mean everything.
Their and move was to put wings on a bicycle.
Now we fly.
When enough people have an and view, the world changes forever.
If you think about it, you're only here because of an and moment.
Opening yourself up isn't easy, but when you do, it's hard to forget.
Because it leads to something new, something better.
{
message: {
properties: {
content: {
type: string
}
host: {
type: string
}
metadata: {
@meteormatt
meteormatt / request.js
Created June 10, 2014 05:45
测试Request的返回结果.
/**
* Created by meteor on 2014/6/10.
*/
var request = require('request');
var fs = require('fs');
var r = request.get('http://www.google.com.hk');
r.pipe(fs.createWriteStream('google.txt'));
r.on('response', function (r) {
console.log(r.statusCode);
})