start new:
tmux
start new with session name:
tmux new -s myname
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forums 的 baozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull
在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003
/** | |
* 提取淘宝地址库 | |
* | |
* 用法: | |
* 1. 打开淘宝 https://www.taobao.com/ | |
* 2. 将下面代码复制到控制台 | |
* 3. 按回车 | |
* 4. 复制输出的 json 数据保存到你的文件 | |
* | |
* 仅支持: chrome 48+ |
//===================================================================== | |
// 拾取颜色并输出 | |
// 返回值: | |
// 0 正常 | |
// 1 被取消 | |
// 2 语法错 | |
//--------------------------------------------------------------------- | |
#include<gtk/gtk.h> | |
#include<ctype.h> | |
//--------------------------------------------------------------------- |
APK is pulled from Nexus6p and dumped with `aapt dump permissions base.apk` | |
package: com.eg.android.AlipayGphone | |
uses-permission: name='com.alipay.permission.ALIPAY_UPDATE_CREDENTIALS' | |
uses-permission: name='com.android.launcher.permission.INSTALL_SHORTCUT' | |
uses-permission: name='android.permission.BLUETOOTH' | |
uses-permission: name='android.permission.CHANGE_WIFI_STATE' | |
uses-permission: name='android.permission.CAMERA' | |
uses-permission: name='android.permission.ACCESS_NETWORK_STATE' | |
uses-permission: name='android.permission.MODIFY_AUDIO_SETTINGS' |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, re | |
import requests | |
import Queue | |
import threading | |
class Proxy(): | |
def __init__(self, proxy_url, target_url, ver_keyword, timeout): |
A script that inspects the DNS TTL for a JVM in a supplied Docker image. The image must also contain a JDK.
It does this by generating a Docker image containing a Java program that outputs the JVM's DNS TTL and executing this, then cleaning up the container, image and temporary files.
$ ./jvm-dns-ttl-policy.sh openjdk:8
import select | |
from collections import deque | |
from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR | |
def create_listen_socket(bind_addr='0.0.0.0', bind_port=55555, backlogs=102400): | |
sock = socket(AF_INET, SOCK_STREAM) | |
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) | |
sock.bind((bind_addr, bind_port)) | |
sock.listen(backlogs) |