Skip to content

Instantly share code, notes, and snippets.

View comzyh's full-sized avatar
🏢
Thinking about Ops

Comzyh comzyh

🏢
Thinking about Ops
View GitHub Profile
@comzyh
comzyh / bits-i7-7700HQ.s
Last active April 19, 2018 14:55
Bit Count test
.file "a.cpp"
.text
.section .rodata.str1.1,"aMS",@progbits,1
.LC10:
.string "a.cpp"
.section .rodata.str1.8,"aMS",@progbits,1
.align 8
.LC11:
.string "bits1(arr[i]) == bits2(arr[i])"
.section .rodata.str1.1
@comzyh
comzyh / weibo_login.py
Created October 20, 2016 18:01
weibo_login.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Thanks @xianhu
# referer: https://github.com/xianhu/LearnPython/blob/master/python_weibo.py
import requests
import urllib
import base64
import time
import json
import logging
@comzyh
comzyh / configure.sh
Created August 16, 2016 14:26
openresty with openssl
sudo yum install libxslt-devel gd gd2 gd-devel gd2-devel perl-devel perl-ExtUtils-Embed geoip-devel
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_mod
@comzyh
comzyh / aioamqp_0.7_heartbeat_bug_reproduce.py
Last active May 7, 2016 19:21
aioamqp 0.7 heartbeat bug reproduce
# -*- coding: utf-8 -*-
# @Author: Comzyh
# @Date: 2016-05-07 22:46:41
# @Last Modified by: Comzyh
# @Last Modified time: 2016-05-08 03:12:27
import aioamqp
import asyncio
import logging
import sys
import datetime
@comzyh
comzyh / ProjectOxford-video.py
Last active January 28, 2016 18:41
ProjectOxford-video.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Comzyh
# @Date: 2016-01-29 01:12:22
# @Last Modified by: Comzyh
# @Last Modified time: 2016-01-29 02:29:15
import requests
import json
import time