This file contains 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
#EXTM3U name="bj-unicom-iptv" | |
#EXTINF:-1 group-title="CCTV;高清",CCTV-1 综合 高清 | |
http://ea6350.lan:4022/udp/239.3.1.129:8008 | |
#EXTINF:-1 group-title="CCTV;高清",CCTV-2 财经 高清 | |
http://ea6350.lan:4022/udp/239.3.1.60:8084 | |
#EXTINF:-1 group-title="CCTV;高清",CCTV-4 中文国际 高清 | |
http://ea6350.lan:4022/udp/239.3.1.105:8092 | |
#EXTINF:-1 group-title="CCTV;高清",CCTV-5+ 体育赛事 高清 | |
http://ea6350.lan:4022/udp/239.3.1.130:8004 | |
#EXTINF:-1 group-title="CCTV;高清",CCTV-7 国防军事 高清 |
This file contains 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
#EXTM3U name="bj-telecom-iptv" | |
#EXTINF:-1 group-title="CCTV",CCTV-1 综合 高清 | |
http://tew823dru.lan:4022/udp/225.1.8.1:8008 | |
#EXTINF:-1 group-title="CCTV",CCTV-2 财经 高清 | |
http://tew823dru.lan:4022/udp/225.1.8.2:8084 | |
#EXTINF:-1 group-title="CCTV",CCTV-3 综艺 高清 | |
http://tew823dru.lan:4022/udp/225.1.8.88:8000 | |
#EXTINF:-1 group-title="CCTV",CCTV-4 中文国际 高清 | |
http://tew823dru.lan:4022/udp/225.1.8.4:8092 | |
#EXTINF:-1 group-title="CCTV",CCTV-5 体育 高清 |
This file contains 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 | |
entries=($(find /dev/disk/by-id -type l -printf '%l %f\n' | grep -v '\(part\|wwn\)' | sed 's#../../##g' | tr '\n' ' ')) | |
entries+=('' '' 'rescan' 'RESCAN') | |
choice=$(whiptail --notags --title "Hotplug" --menu "Select device" 16 100 9 "${entries[@]}" 3>&1 1>&2 2>&3) | |
test -n "$choice" || exit 0 | |
case $choice in | |
"rescan") | |
echo 'Rescan disks...' | |
echo '- - -' > /sys/class/scsi_host/host0/scan |
This file contains 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
Name: emacs25 | |
Version: 25.3 | |
Release: 1%{?dist} | |
Summary: GNU Emacs | |
#Group: | |
License: GPL | |
URL: http://www.gnu.org/software/emacs/ | |
Source0: http://mirrors.ustc.edu.cn/gnu/emacs/emacs-%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
This file contains 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
#!/usr/bin/python | |
import ipaddress | |
import argparse | |
from mininet.topo import Topo | |
from mininet.nodelib import LinuxBridge | |
from mininet.net import Mininet | |
from mininet.cli import CLI | |
from mininet.util import waitListening |
This file contains 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
#!/usr/bin/python | |
import sys | |
_, ip, user, passwd = sys.argv | |
CLI_PROMPT = r'[\[<][^>\]]+[\]>]' | |
ssh = spawn('ssh %s@%s' % (username, ip)) | |
if not ssh: | |
return | |
ssh.expect('password') |
This file contains 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
#!/usr/bin/python | |
import sys | |
import code | |
from lxml import etree | |
from lxml.builder import E | |
from ncclient import manager | |
_, ip, user, passwd = sys.argv | |
netconf = manager.connect(host=ip, port=830, username=user, password=passwd, |
This file contains 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
#!/usr/bin/python | |
import sys | |
import code | |
from lxml import etree | |
from lxml.builder import E | |
from ncclient import manager | |
_, ip, user, passwd = sys.argv | |
netconf = manager.connect(host=ip, port=830, username=user, password=passwd, |
This file contains 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
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import sys | |
def parse(s): | |
return list(map(lambda c : 0 if c == ' ' else ord(c) - ord('0'), s)) | |
board = [parse(input()) for i in range(9)] | |
# s = input() | |
# board = [parse(s[i * 9 : i * 9 + 9]) for i in range(9)] | |
# input() | |
# answer = [parse(input()) for i in range(9)] |
This file contains 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 | |
IFS=$'\r\n' | |
array=(`lsusb -v 2> /dev/null | grep "\(Bus\|bInterfaceClass\)" | awk -F ' ' '{if(/Bus/){printf "%s ",$0} else {$1="";$2="-";print $0}}' | grep -o "ID.*"`) | |
for i in `seq 0 $(expr ${#array[*]} - 1)`; do | |
echo -n "$i " | |
echo "${array[$i]}" | |
done | |
echo -n "choose usb device: " | |
id=`echo ${array[$(read)]} | grep -o "[0-9]\+:[0-9]\+"` | |
virsh list --all |
NewerOlder