#!/bin/sh
if ! test -f last_version.log; then
echo "not found last_version.log"
exit 1
fi
found_changes=0
last_version=`tail -n 1 last_version.log`
var getKey = function(length){
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789;<>,./?{}[]!@#$%^&*(()";
for( var i=0; i < length; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
<?php
echo sprintf("\033[0;30m%s\033[0m" . PHP_EOL, "haha");
echo sprintf("\033[0;31m%s\033[0m" . PHP_EOL, "haha");
echo sprintf("\033[0;32m%s\033[0m" . PHP_EOL, "haha");
echo sprintf("\033[0;33m%s\033[0m" . PHP_EOL, "haha");
echo sprintf("\033[0;34m%s\033[0m" . PHP_EOL, "haha");
echo sprintf("\033[0;35m%s\033[0m" . PHP_EOL, "haha");
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
SHELL=/bin/bash | |
key=my key | |
go: clean | |
@ make --no-print-directory `git ls-files | sed 's/$$/.ubf/'` | |
@ for i in *.ubf; do x=`basename $$i .ubf`; ./my_diff.pl $$x $$i; done | |
words.bf: enc | |
./enc "$(key)" $(words) $@ |
alias docker-pid="sudo docker inspect --format '{{.State.Pid}}'"
alias docker-ip="sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}'"
#the implementation refs from https://github.com/jpetazzo/nsenter/blob/master/docker-enter
function docker-enter() {
#if [ -e $(dirname "$0")/nsenter ]; then
#Change for centos bash running
###打开ip转发
echo 1 > /proc/sys/net/ipv4/ip_forward
###查看
iptables -L -n
###Base64
public final class Base64 {
static private final int BASELENGTH = 128;
static private final int LOOKUPLENGTH = 64;
static private final int TWENTYFOURBITGROUP = 24;
static private final int EIGHTBIT = 8;
static private final int SIXTEENBIT = 16;
static private final int FOURBYTE = 4;
###产生1024位RSA私匙,用3DES加密它,口令为trousers,输出到文件rsaprivatekey.pem
openssl genrsa -out rsaprivatekey.pem -passout pass:trousers -des3 1024
###从文件rsaprivatekey.pem生成的公钥匙输出到文件rsapublickey.pem
openssl rsa -in rsaprivatekey.pem -passin pass:trousers -pubout -out rsapubckey.pem