Skip to content

Instantly share code, notes, and snippets.

@dapngn
dapngn / console.xml
Last active October 2, 2017 18:20
ConsoleZ settings
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<settings lang="auto" icon_size="0">
<console shell="" init_dir="" refresh="100" change_refresh="10" rows="25" columns="80" buffer_rows="500" buffer_columns="0" start_hidden="0" save_size="0">
<colors background_text_opacity="255">
<color id="0" r="7" g="54" b="66"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>
<color id="5" r="211" g="54" b="130"/>
@dapngn
dapngn / .vsvimrc
Last active August 22, 2023 05:51
VsVim settings
" --------------------------------------------------
" VsVim Options
" --------------------------------------------------
" let VsVim handle ctrl-[
" let VsVim handle ctrl-]
" let VsVim handle ctrl-I
" let VsVim handle ctrl-O
" --------------------------------------------------
" VisualStudio Settings
@dapngn
dapngn / WebInteractionSnip.cs
Last active December 20, 2015 06:29
Selenium web driver boilerplate.
public IWebDriver Driver;
public WebDriverWait Wait;
public bool Result { get; set; }
public delegate void Interaction(WebInteraction webInteraction);
public WebInteraction.Interaction Script;
public WebInteraction( int WithBrowser,
Interaction Script,
TimeSpan? ResponseTimeout = null )
{
@dapngn
dapngn / SimpleRoslyn.cs
Last active December 20, 2015 06:29
A simple call to the Roslyn api.
private readonly ScriptEngine _engine;
public ScriptExecutor()
{
_engine = new ScriptEngine();
_engine.AddReference("System");
_engine.AddReference(this.GetType().Assembly.Location);
_engine
.AddReference( Environment
.CurrentDirectory + "\\WebDriver.dll");
@dapngn
dapngn / FunctionalWebTest.cs
Last active December 20, 2015 06:28
This C# does not need to be compiled into a .dll, it's a .csx file that is compiled at runtime by the Roslyn api. The expression lambda is populated by Selenium webdriver code.
ExpectedResult = true;
ScriptResult = (new WebInteraction(
WithBrowser: WebInteraction.FireFox,
Script: (w) =>
{
// Selenium webdriver code
w.Driver.Navigate().GoToUrl("https://duckduckgo.com/");
w.Wait