This file contains hidden or 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
[Fact] | |
public void ExampleForTakingControlOfConsole() | |
{ | |
var stream = new System.IO.MemoryStream(); | |
using (var writer = new System.IO.StreamWriter(stream)) | |
using (var reader = new System.IO.StreamReader(stream)) | |
{ | |
writer.WriteLine("quit"); | |
writer.Flush(); | |
stream.Position = 0; //reset stream before reading |
This file contains hidden or 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
// https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-key-bindings | |
[ | |
{ | |
"key": "ctrl+shift+pageup", | |
"command": "workbench.action.terminal.focusPrevious", | |
"when": "terminalFocus" | |
}, | |
{ | |
"key": "ctrl+shift+pagedown", | |
"command": "workbench.action.terminal.focusNext", |
This file contains hidden or 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
#include <avr/io.h> | |
#include <util/delay.h> | |
/* 9600 8n1 com */ | |
#define BAUD 9600 | |
#define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) | |
int main(void) | |
{ |
This file contains hidden or 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
# .bash_profile | |
export CLICOLOR=1 | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs |
This file contains hidden or 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
export CLICOLOR=1 | |
# user@host:pwd$ | |
# https://superuser.com/questions/239994/how-to-have-full-directory-path-always-shown-in-mac-terminal-like-linux-termina | |
# pwd and prompt are in the directory color (34 is blue, but homebrew theme displays it as light orange) | |
export PS1='\u@\h:\e[34m\w\$\e[0m ' | |
export PATH=$PATH:~/Library/Android/sdk/platform-tools | |
export PATH=$PATH:~/Library/Android/sdk/emulator |
This file contains hidden or 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
const uint8_t DATA = 7; | |
const uint8_t OUTPUT_ENABLE = 8; | |
const uint8_t LATCH = 9; | |
const uint8_t CLOCK = 10; | |
const uint8_t CLEAR = 11; | |
const uint8_t Zero = 0x3F; | |
const uint8_t One = 0x06; | |
const uint8_t Two = 0x5B; | |
const uint8_t Three = 0x4F; |
This file contains hidden or 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
#Summarize size of the contents of directories under current directory and sort | |
# get summarized human readable sizes | sort human readable numbers | |
du -sh ./* | sort -h | |
# total disk free per partition | |
df -h |
This file contains hidden or 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
def map = { collection, f -> | |
def result = [] | |
collection.each { element -> | |
result.add(f(element)) | |
} | |
result | |
} | |
def reduce = { collection, accumulator, f -> | |
def result = accumulator |
This file contains hidden or 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 Class1 | |
{ | |
[Fact] | |
public void applesauce() | |
{ | |
Result<int> result = | |
new Success<int>(32) | |
.Bind(i => new Success<int>(i + 1)); | |
result.OnSuccess(Console.WriteLine); |
This file contains hidden or 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
root@a9b8ec9a8ca9:~# dotnet bin/gitnstats/gitnstats.dll Rubberduck/ | head -103 | |
Repository: Rubberduck/ | |
Branch: next | |
Commits Path | |
1754 RetailCoder.VBE/Rubberduck.csproj | |
983 RetailCoder.VBE/UI/RubberduckUI.resx | |
965 RetailCoder.VBE/UI/RubberduckUI.Designer.cs | |
833 RetailCoder.VBE/App.cs | |
761 Rubberduck.Parsing/VBA/RubberduckParserState.cs |