Skip to content

Instantly share code, notes, and snippets.

View meteormatt's full-sized avatar

Liu Xing meteormatt

  • 上海
  • 21:37 (UTC +08:00)
View GitHub Profile
@meteormatt
meteormatt / app.js
Last active March 28, 2023 09:22
刷票软件
/**
* User: meteor
* Date: 13-12-27
*/
var request = require('request');
var number = 0;
var max_number = 100;
function start() {
request.post('http://cn.technode.com/chinabang-2014/nominate',
{
"Message": "Successful!",
"Code": "Success",
"Data": {
"TotalCount": 1,
"HostId": "cn",
"PageNum": 1,
"PageSize": 20,
"Instances": {
"Instance": [
const ALY = require('aliyun-sdk');
var oss = new ALY.OSS({
"accessKeyId": '',
"secretAccessKey": '',
"endpoint": 'http://oss-us-west-1.aliyuncs.com',
"apiVersion": "2013-10-15"
});
var redirUrl = oss.getSignedUrl('getObject', {
Bucket: 'meteormatt',
Key: 'Mac图标.jpg',
@meteormatt
meteormatt / youku.js
Last active October 8, 2016 15:14
优酷
/**
* Created by Meteor on 16/8/9.
*/
var request = require('request');
request = request.defaults({jar: true, followAllRedirects: true});
// require('request').debug = true;
let username = '用户名';
let password = '密码';
<!DOCTYPE html><html><head><meta charset="utf-8"><title>当前</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><style>@import url('https://fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200');.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-ti
@meteormatt
meteormatt / 1.js
Created January 3, 2014 07:47
模拟Windows命令行
'use strict';
var iconv = require('iconv-lite');
var exec = require('child_process').exec;
var child = exec('dir', function (error, stdout, stderr) {
var str = iconv.encode(stdout, 'GBK');
console.log('stdout: ' + str);
// console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
meteor@Meteor:$ supervisor app.js
DEBUG: Running node-supervisor with
DEBUG: program 'app.js'
DEBUG: --watch '.'
DEBUG: --ignore 'undefined'
DEBUG: --extensions 'node|js'
DEBUG: --exec 'node'
DEBUG: Starting child process with 'node app.js'
@meteormatt
meteormatt / gist:5289556
Last active December 15, 2015 16:29
xinit
root@baidu:/home/meteor# XINITRC=/home/meteor/rc/dummy.xinitrc xinit -- :1 -ac -config dummy.conf
X.Org X Server 1.11.3
Release Date: 2011-12-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.42-37-generic x86_64 Ubuntu
Current Operating System: Linux baidu.com 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 18:44:18 UTC 2012 x86_64
Kernel command line: root=/dev/xvda1 console=hvc0 ro
Build Date: 27 February 2013 02:07:42AM
@meteormatt
meteormatt / x.sh
Last active December 15, 2015 15:19
X日志
root@Meteor:/home/meteor# startx
X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-32-xen x86_64 Ubuntu
Current Operating System: Linux Meteor 3.5.0-26-generic #42-Ubuntu SMP Fri Mar 8 23:18:20 UTC 2013 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-26-generic root=UUID=369a6a05-a7fd-4411-a239-6df450539ee0 ro quiet splash vt.handoff=7
Build Date: 05 November 2012 10:00:21AM
public class RandomNumber {
public static void main(String args[]) {
int[] number = new int[4];
boolean flag = true;
for (int i = 0; i < number.length; i++) {
int temp = RandomNumber.Generator();
while (flag) {
if (RandomNumber.Check(temp, number))
flag = false;