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 __builtin__ | |
from StringIO import StringIO | |
import os | |
import ConfigParser | |
import pytest | |
class MockFileManager(): | |
def __init__(self): | |
self.files = {} |
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
set DEVCON="C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe" | |
REM DevCon hwids - https://msdn.microsoft.com/en-us/library/windows/hardware/ff544772(v=vs.85).aspx | |
%DEVCON% hwids invalid > devcon_hwids_invalid.txt 2>&1 | |
%DEVCON% hwids * > devcon_hwids_star.txt 2>&1 | |
%DEVCON% hwids =AudioEndpoint > devcon_hwids_class.txt 2>&1 | |
%DEVCON% hwids MMDEVAPI\AudioEndpoints > devcon_hwids_hwid.txt 2>&1 | |
%DEVCON% hwids @SWD\MMDEVAPI\{0.0.0.00000000}.{32247EDD-EAC6-46F8-BEFB-44448BDBC8D3} > devcon_hwids_instanceid.txt 2>&1 | |
REM DevCon classes - https://msdn.microsoft.com/en-us/library/windows/hardware/ff544712(v=vs.85).aspx |
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
string address = "http://<TEAMCITY>/httpAuth/app/rest/agents/id:1/enabled"; | |
byte[] data = Encoding.UTF8.GetBytes("false"); | |
using (var client = new System.Net.WebClient()) | |
{ | |
client.UseDefaultCredentials = true; | |
client.Credentials = new NetworkCredential("<USER>", "<PASSWORD>"); | |
byte[] response = client.UploadData(address, "PUT", data); | |
} |
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 paramiko | |
client = paramiko.SSHClient() | |
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
client.connect('HOST', port=22, username='USERNAME', password='PASSWORD') | |
channel = client.get_transport().open_session() | |
channel.invoke_shell() | |
while channel.recv_ready(): |
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
# Calculates the levenshtein distance and the edits between two strings | |
def levenshtein(s1, s2, key=hash): | |
rows = costmatrix(s1, s2, key) | |
edits = backtrace(s1, s2, rows, key) | |
return rows[-1][-1], edits | |
# Generate the cost matrix for the two strings | |
# Based on http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Python | |
def costmatrix(s1, s2, key=hash): |
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
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints | |
language: php | |
# list any PHP version you want to test against | |
php: | |
# using major version aliases | |
# aliased to 5.2.17 | |
- 5.2 | |
# aliased to 5.3.29 |
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
@-moz-document url-prefix("https://<TEAMCITY_SERVER>/viewLog.html") { | |
/* Timestamp */ | |
.log .ts, .log .time, .log .ts_in { | |
color: #6C6C6C; | |
} | |
/* Messages */ | |
.l0, .l1, .l2, .l3, .l4, .l5, .l6, .l7, .l8, .l9, .l10, .l11, .l12, .l13, .l14, .l15, .l16, .l17, .l18, .l19, .l20, .l21, .l22, .l23, .l24, .l25, .lDeep { | |
color: white; | |
} |
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 time | |
import inspect | |
import types | |
def _assert(func): | |
if not func(): | |
if isinstance(func, types.FunctionType): | |
raise AssertionError(inspect.getsource(func).strip()) | |
else: | |
raise AssertionError() |
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
temp |
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
Collecting attrdict | |
1 location(s) to search for versions of attrdict: | |
* https://pypi.python.org/simple/attrdict/ | |
Getting page https://pypi.python.org/simple/attrdict/ | |
Looking up "https://pypi.python.org/simple/attrdict/" in the cache | |
Current age based on date: 96 | |
Freshness lifetime from max-age: 600 | |
Freshness lifetime from request max-age: 600 | |
The response is "fresh", returning cached response | |
600 > 96 |
NewerOlder