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
REM Follow instructions at https://www.youtube.com/watch?v=2pvK-6321ig | |
REM If it does not work (keeps waiting at obtaining IP address) repeat the first step: | |
REM - go to "network connections", select the connection you want to share. Go to "properties" and "sharing". | |
REM - Deselect "Allow other users to connect through this computer's Internet connection". Click "OK". | |
REM - Go to "properties" and "sharing" again. | |
REM - select "Allow other users to connect through this computer's Internet connection". Select the network you just created just below that. Click "OK" | |
REM - Try again to connect. Should work. | |
netsh wlan set hostednetwork mode=allow ssid=TheW0lf key=<password_here> | |
netsh wlan start hostednetwork |
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
Function vs2013CommandPromptVariables() | |
{ | |
pushd 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools' | |
cmd /c "VsDevCmd.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd |
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
function getBackgroundColor(rangeSpecification) { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
return sheet.getRange(rangeSpecification).getBackground(); | |
} | |
function getForegroundColor(rangeSpecification) { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
return sheet.getRange(rangeSpecification).getFontColor(); | |
} |
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
public class RunnableInDebugOnlyAttribute : FactAttribute | |
{ | |
private string _skip; | |
public override string Skip | |
{ | |
get | |
{ | |
return Debugger.IsAttached | |
? _skip |
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
Show hidden characters
{ | |
"cmd": ["ruby", "D:\\path\\to\\golfscript.rb", "$file"], | |
"selector": "source.gs" | |
} | |
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
# use glob syntax | |
syntax: glob | |
*.obj | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*.vssscc |
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
[Test] | |
public void ComputeResultWithTimeout() | |
{ | |
var task = Task.Factory.StartNew(() => ComputeResult("bla")); | |
//task.Wait(0999); | |
task.Wait(1000); | |
if (task.IsCompleted) | |
Console.WriteLine("OK, got: " + task.Result); |
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
git config --global user.name <user> | |
git config --global user.email <email> | |
git config --global help.autocorrect 1 | |
git config --global color.ui auto | |
git config --global core.autocrlf true | |
git config --global alias.glog "log --graph --oneline --all --decorate" | |
git config --global core.editor "C:/Windows/notepad.exe" |
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
.,{)\.@%!},,2= # is number prime (expects number on stack and adds 1 or 0 (leaves number on stack)) | |
:§,{)§\%!},,2= # just like above, except this consumes the number from the stack. | |
..,1>{*}*\%)= # shorter version, using Wilson's theorem (https://en.wikipedia.org/wiki/Wilson%27s_theorem) | |
# must take a parameter > 1, therwise fails |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target name="coloredConsole" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false" | |
layout="${longdate}|${pad:padding=5:inner=${level:uppercase=true}}|${message}" > | |
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" /> | |
<highlight-row condition="level == LogLevel.Info" foregroundColor="Gray" /> | |
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" /> |