Skip to content

Instantly share code, notes, and snippets.

' Visual Basic Script program to reset the DMA status of all ATA drives
' Copyright © 2006 Hans-Georg Michna
' Version 2007-04-04
' Works in Windows XP, probably also in Windows 2000 and NT.
' Does no harm if Windows version is incompatible.
If MsgBox("This program will now reset the DMA status of all ATA drives with Windows drivers." _
@chinhodado
chinhodado / gist:8e83972b7af844f63fca
Created June 26, 2015 15:03
CodedUI PlaybackSettings default values
internal void ApplySettings(IDictionary<string, string> appSettings)
{
this.DelayBetweenSendKeys = PlaybackSettings.GetConfigOptionValueInt("DelayBetweenSendKeys", 10, appSettings);
this.DelayBetweenActions = PlaybackSettings.GetConfigOptionValueInt("DelayBetweenActions", 100, appSettings);
this.SearchTimeout = PlaybackSettings.GetConfigOptionValueInt("SearchTimeout", 120000, appSettings);
this.SearchInMinimizedWindows = PlaybackSettings.GetConfigOptionValue<bool>("SearchInMinimizedWindows", true, appSettings);
this.MatchExactHierarchy = PlaybackSettings.GetConfigOptionValue<bool>("MatchExactHierarchy", false, appSettings);
this.SmartMatchOptions = PlaybackSettings.GetSmartMatchOptions(appSettings);
this.ThinkTimeMultiplier = PlaybackSettings.GetConfigOptionValueDouble("ThinktimeMultiplier", 1.0, appSettings);
this.WaitForReadyTimeout = PlaybackSettings.GetConfigOptionValueInt("WaitForReadyTimeout", 60000, appSettings);
@chinhodado
chinhodado / gist:6fc37def3e12ea09f785
Created January 9, 2015 02:57
How to use meld with Sourcetree on Windows
  • Install meld
  • Add location of meld.exe to the PATH, e.g. C:\Program Files (x86)\Meld
  • In SourceTree, go to Tools/Options/Diff
  • In External Diff Tool, choose Custom
  • Enter meld in Diff Command and $LOCAL $REMOTE in Arguments
  • Click Ok and restart SourceTree
Simulation: 1000000 battles
Simulation progress:
Player 2 won: 498443
Player 1 won: 501557
Time: 385.15s
Go back to main page
Most frequent appearance in win team:
Guillaume, Fanatic: 19613
{
"scalePatternParams": {
"202": [
1.5,
1
],
"203": [
1.75,
1.25,
1
@chinhodado
chinhodado / .gitconfig
Created April 22, 2014 13:55
.gitconfig for using Meld with SourceTree on Windows
[user]
name = foo
email = foo@bar.com
[core]
autocrlf = true
[difftool "sourcetree"]
cmd = 'C:/Program Files (x86)/Meld/meld/meld.exe' \"$LOCAL\" \"$REMOTE\"
@chinhodado
chinhodado / ChampionsLeague.java
Created December 23, 2012 04:52
Champions League 2012/2013 1/16 draw simulation. Total 5463 possibilities.
import com.google.common.collect.Collections2;
import java.util.*;
public class ChampionsLeague {
public static class Team{
String name, country;
int place;
char group;
public Team(){}
public Team(String name, String country, int place, char group){
this.name=name;