Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
#
use 5.010;
use EV;
use AnyEvent::Socket;
use AnyEvent::Handle;
$| = 1;
@userid
userid / anyevent_echo.pl
Created June 1, 2018 03:06
A simple TCP server written in Perl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use IO::Socket::INET;
use AnyEvent;
use AnyEvent::Util;
$AnyEvent::Util::MAX_FORKS = 15;
@userid
userid / douyu_new.py
Created May 31, 2018 13:31 — forked from Justsoos/douyu_new.py
斗鱼2018新api,直播流URL提取
#! /usr/bin/env python3
import re
import requests
import argparse
import time
import hashlib
import json
def get_api(url,rate):
==> 继续构建 shutter ?[Y/n]
==> -------------------
==> y
==> 构建和安装软件包
==> 为 shutter 安装或者是构建缺失的依赖关系:
正在解决依赖关系...
正在查找软件包冲突...
软件包 (71) cairo-perl-1.106-5 glib-perl-1.326-1 gnome-mime-data-2.18.0-7 gnome-vfs-nosmb-2.24.4-10 gnome-vfs-perl-1.082-9
#$sudo apt install checkinstall ncurses-dev
# wget https://github.com/vim/vim/archive/master.zip
#
./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes \
--enable-pythoninterp=yes --with-python-config-dir=/usr/lib/python2.7/config \
--enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3/config \
--enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 \
--enable-cscope --prefix=/usr/
<?php
$pu_key = '
-----BEGIN PUBLIC KEY-----
MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhALbr6abInZtlggBiXmgwl5fEUe3KHY9s
Zj4bomDh+Jn9IC2CXnLaHYxBzmyoakIMWlJn43cP5bSsqZMTKmKDj/WJ125yR068
L7uvm9YSQBi07hxeW+LISB5lpMrNyuZMnwIDAQAB
-----END PUBLIC KEY-----
';
$data = '1234567890!@#$%^&*()abcd';
mkdir libev-4.24/libev && cp libev-4.24/*.h libev-4.24/libev
CFLAGS="-I/`pwd`/libev-4.24/" LDFLAGS="-L/`pwd`/libev-4.24/.libs/ "
CO --disable-documentation --enable-static \
--with-mbedtls-include=/`pwd`/mbedtls-2.5.1/include/ --with-mbedtls-lib=/`pwd`/mbedtls-2.5.1/library/ \
--with-sodium-include=/`pwd`/libsodium/src/libsodium/include/ --with-sodium-lib=/`pwd`/libsodium/src/libsodium/.libs/ \
--with-cares-include=/`pwd`/c-ares-1.12.0/ --with-cares-lib=/`pwd`/c-ares-1.12.0/.libs
grep pypi.python.org /usr/share/pyshared/pip -r
/usr/share/pyshared/pip/index.py:DEFAULT_MIRROR_URL = "last.pypi.python.org"
/usr/share/pyshared/pip/index.py: ['a.pypi.python.org', 'b.pypi.python.org', 'c.pypi.python.org',
/usr/share/pyshared/pip/index.py: 'd.pypi.python.org']
/usr/share/pyshared/pip/commands/install.py: default='http://pypi.python.org/simple/',
/usr/share/pyshared/pip/commands/search.py: default='http://pypi.python.org/pypi',

git clone -b tls1.3-draft-18 --single-branch https://github.com/openssl/openssl.git

--with-openssl=../openssl --with-openssl-opt="enable-ec_nistp_64_gcc_128 enable-tls1_3"

ssl_protocols TLSv1 TLSv1.2 TLSv1.3;

ssl_ciphers 'TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-CCM-SHA256:CHACHA20:TLSv1.2:AESGCM:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:AES128-SHA:+RSA:!DH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';

./configure --with-zlib --with-ssl --with-md5-passwords --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-kerberos5