System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
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) | |
<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;} |
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); |
#!/bin/bash | |
user=`whoami` | |
if [ "$user" != "root" ]; then | |
echo "You Password" | su root | |
fi |
'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) { |
'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) |
// 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 |
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), { |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by: