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
// ==UserScript== | |
// @name prowand magnit timesheet filler | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://prowand.pro-unlimited.com/worker/standard/billing/billingedit/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=pro-unlimited.com | |
// @grant none | |
// ==/UserScript== |
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
########################################################### | |
# Constants | |
$DEFAULTS = [PSCustomObject]@{ | |
dataSource = "YourServer.com,1434;" | |
database = "DB" | |
testOutputPath = [Environment]::GetFolderPath("Desktop")+"\DB_TEST" | |
queryTimeout = 600 | |
connectionTimeout = 15 | |
} |
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
<# | |
To fix problems with running sites in iis express from visual studio: | |
1. Close visual studio completely | |
2. Run this script as an administrator | |
3. Reopen your solution in visual studio | |
If you can't run this script, first run: | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned | |
#> |
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
<# | |
.Synopsis | |
Fix all java run-times connections to the internet behind enterprise firewalls/proxies that alter the certificate paths | |
.Description | |
Run as administrator and in the same directory as your enterprise's root certificate authority. |
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 os | |
import threading | |
import subprocess | |
import time | |
import select | |
import logging | |
import signal | |
try: | |
from Queue import Queue, Empty |
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/env python | |
""" | |
This is a solution to the first backend challenge. This solution uses some best practices, | |
and a function that is both highly performance optimized and more flexible than the requirements. | |
""" | |
import time | |
BLAH = """nononoffffccaaccaaddaaaadddchjkl | |
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasddfasdfasdasdfds |
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
BLAH = "nononoffffccaaccaaddaaaadchjkl" | |
longest = "" | |
for x in range(0, len(BLAH)): | |
for y in range(1, len(BLAH) + 1 - x): | |
string = BLAH[x:][:y] | |
uniqueChars = set(char for char in string) | |
if len(uniqueChars) < 3: | |
if len(string) > len(longest): | |
longest = string | |
print longest |
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
BLAH = "nononoffffccaaccaaddaaaadchjkl" | |
print max([string[:y] for string in [BLAH[x:] for x in range(0, len(BLAH))] for y in range(1, len(string) + 1) if len(set(string[:y])) < 3], key=lambda x: len(x)) |
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
''' | |
Created on Jul 30, 2013 | |
@author: slujan | |
''' | |
import unittest | |
from pymongo import MongoClient | |
import datetime | |
class TestMongo(unittest.TestCase): |
NewerOlder