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
get_path_true_case() | |
{ | |
local C_PATH="/" | |
local C="" | |
local OLD_IFS="$IFS" | |
IFS=/ | |
for C in $1; do | |
if [ "$C_PATH" = "/" ]; then | |
C_PATH=`find "$C_PATH" -maxdepth 1 -type d -ipath "$C_PATH$C"` | |
else |
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
// ... | |
static function OnBeforeRequest(oSession: Session) { | |
// ... | |
var clientColors = ["red", "blue", "green", "gold", "orange", "purple"]; | |
var clientId = oSession.oRequest.headers["User-Agent"] + oSession.oRequest.headers["Authorization"]; | |
oSession["ui-color"] = clientColors[Math.abs(clientId.GetHashCode()) % clientColors.length]; | |
// ... | |
} | |
// ... |
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
// ... | |
static function OnBeforeResponse(oSession: Session) { | |
// ... | |
if (oSession.uriContains("/someMethod")) { | |
var json = Fiddler.WebFormats.JSON.JsonDecode(oSession.GetResponseBodyAsString()).JSONObject; | |
var p = json["field"]["subfield"]["subsubfield"]; | |
p["field1"] = 0 != 1; | |
p["anotherfield2"] = 0 != 0; | |
p["yaf3"] = 0 != 1; | |
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
#!/usr/bin/env bash | |
# Find specific file in GIT history | |
if [ "$1" = "" ]; then | |
echo "Usage: ./$(basename ${0}) file" && exit 1 | |
fi | |
_file=$1 | |
blob=`git hash-object $_file` |
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
{ | |
"title":"Input source change", | |
"rules": [ | |
{ | |
"description": "If pressed alone, CmdL for English, CmdR for Russian", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_command", | |
"modifiers": {"optional": ["any"]} |
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
#!/bin/bash -l | |
# Utility to monitor host availability changes by ping, with timestamps and durations | |
HOST="$1" | |
ONLINE_INTERVAL=5 | |
OFFLINE_INTERVAL=1 | |
TIMEOUT=500 | |
if [ "x$HOST" == "x" ]; then | |
echo "usage: $(basename "$0") host" | |
exit |
OlderNewer