This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fetch = require('node-fetch') | |
| const FormData = require('form-data') | |
| const pdfPath = '/path/to/pdfFile' | |
| async function upload () { | |
| const formData = new FormData() | |
| formData.append('name', 'xxx') | |
| formData.append('filename', 'xxxxxxxx.pdf') | |
| formData.append('file', fs.readFileSync(pdfPath), { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| import {createAction} from 'Utils'; | |
| import {Client} from 'ssh2'; | |
| import net from 'net'; | |
| import Redis from 'ioredis'; | |
| function getIndex(getState) { | |
| const {activeInstanceKey, instances} = getState() | |
| return instances.findIndex(instance => instance.get('key') === activeInstanceKey) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| var path = require('path') | |
| // Stack trace format : | |
| // https://github.com/v8/v8/wiki/Stack%20Trace%20API | |
| var stackReg = /at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i; | |
| var stackReg2 = /at\s+()(.*):(\d*):(\d*)/i; | |
| module.exports = function log (basedir) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| user=`whoami` | |
| if [ "$user" != "root" ]; then | |
| echo "You Password" | su root | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:var%20KICKASSVERSION='2.0';var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='//hi.kickassapp.com/kickass.js';void(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <meta http-equiv="Content-Language" content="zh-CN"/> | |
| <title>抽奖活动</title> | |
| <style type="text/css"> | |
| body {padding-top:100px;font:12px "\5B8B\4F53",sans-serif;text-align:center;} | |
| .result_box {margin:0 auto;width:700px;padding:100px 0;text-align:center;border:3px solid #40AA53;background:#efe;} | |
| .result_box #oknum {width:700px;color:#cc0000;font-size:50pt;font-family:Verdana;text-align:center;border:none;background:#efe;} | |
| .button_box {margin:50px 0 0 0;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var app = express(); | |
| var logger = require('morgan'); | |
| var FileStreamRotator = require('file-stream-rotator'); | |
| var logDirectory = config.access_log_path; | |
| // ensure log directory exists | |
| fs.existsSync(logDirectory) || fs.mkdirSync(logDirectory) | |
NewerOlder