I got error like below:
npm ERR! Unexpected end of input at 1:23369
or
npm ERR! Unexpected end of JSON ...
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
#Resend packets in pcap file | |
#Created 7/30/2016, thimer | |
import struct | |
import socket | |
import sys | |
import time | |
def hexofbin(bin, show=4): |
#!/usr/bin/env bash | |
GEOIP_WASB_DIR=$1 | |
GEOIPCUSTOM_DIR=/home/sshuser | |
if [ -z "$GEOIP_WASB_DIR" ]; then | |
echo "[ERROR] No wasb directory specified. Exiting!" | |
exit 132 | |
fi | |
# copy maxmind geoip database |
# This configuration file for Fluentd / td-agent is used | |
# to watch changes to Docker log files that live in the | |
# directory /var/lib/docker/containers/ and are symbolically | |
# linked to from the /var/log directory using names that capture the | |
# pod name and container name. These logs are then submitted to | |
# Google Cloud Logging which assumes the installation of the cloud-logging plug-in. | |
# | |
# This configuration is almost identical to google-fluentd-journal.conf, with | |
# the one difference being that this doesn't try to collect systemd journal | |
# logs. |
#!/usr/bin/env bash | |
# | |
# Auto install latest kernel for TCP BBR | |
# | |
# System Required: CentOS 6+, Debian7+, Ubuntu12+ | |
# | |
# Copyright (C) 2016-2017 Teddysun <[email protected]> | |
# | |
# URL: https://teddysun.com/489.html | |
# |
<?php | |
$array = array('HTTP_USER_AGENT', 'HTTP_HOST', 'HTTP_ACCEPT', 'PATH', 'SERVER_SIGNATURE', 'SERVER_SOFTWARE', 'SERVER_NAME', 'SERVER_ADDR', 'SERVER_PORT', 'DOCUMENT_ROOT', 'SERVER_ADMIN', 'SCRIPT_FILENAME', 'REMOTE_PORT', 'GATEWAY_INTERFACE', 'SERVER_PROTOCOL', 'REQUEST_METHOD', 'QUERY_STRING', 'REQUEST_URI', 'SCRIPT_NAME', 'PHP_SELF', 'REQUEST_TIME'); | |
// 将 $_SERVER 数组赋予 $srv数组; | |
$srv = $_SERVER; | |
// 释放掉 $srv中不相关的键 | |
foreach($array as $name ) { | |
unset($srv[ $name ]); | |
} | |
print_r($srv); |
-- 1.Setup the device ID and access credential.See later. | |
-- PIN assignment | |
-- D5 is the driver PIN for the dust detector | |
dpin = 5 | |
-- D0 is the LED on the NodeMCU board | |
lpin = 0 | |
gpio.mode(dpin, gpio.INT) | |
-- The current pulse params | |
rising_ts = 0 |
Solution from https://askubuntu.com/questions/889535/how-to-install-pip-for-python-3-6-on-ubuntu-16-10
After install python3.6
via apt install python3.6
, pip
failure:
$ sudo pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
# Import unittest module for creating unit tests | |
import unittest | |
# Import time module to implement | |
import time | |
# Import the Selenium 2 module (aka "webdriver") | |
from selenium import webdriver | |
# For automating data input |