This file contains 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
# Sets the target folders and the finalframework product. | |
# 如果工程名称和Framework的Target名称不一样的话,要自定义FMKNAME | |
# 例如: FMK_NAME = "MyFramework" | |
FMK_NAME=${PROJECT_NAME} | |
# Install dir will be the final output tothe framework. | |
# The following line create it in the rootfolder of the current project. | |
INSTALL_DIR=${SRCROOT}/../Products/${FMK_NAME}.framework | |
# Working dir will be deleted after theframework creation. |
This file contains 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
import random | |
TEST_N = 10000000 | |
def calc(target): | |
rate_max = 1 | |
rate_min = 0 | |
while True: | |
rate = dt = (rate_max + rate_min)/2.0 |
This file contains 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
killLongRunningOps = function(startswith) { | |
currOp = db.currentOp(); | |
currOp.inprog.forEach(function(op) { | |
if (op.op == "query" && op.ns.startsWith(startswith)) { | |
print("Killing opId: " + op.opid + " running over for secs: " + op.secs_running); | |
db.killOp(op.opid); | |
} | |
}); | |
}; |
This file contains 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
# -*- coding: utf-8 -*- | |
import time | |
import win32con | |
import win32api | |
import ctypes | |
from ctypes import wintypes | |
byref = ctypes.byref | |
user32 = ctypes.windll.user32 | |
This file contains 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
#!/usr/bin/bash | |
docker ps |awk '{if(NR>1) print $1}' | xargs -n 1 docker inspect -f '{{ .Name }} {{ .NetworkSettings.IPAddress }}' |