Skip to content

Instantly share code, notes, and snippets.

View nicolas-martin's full-sized avatar

Nicolas Martin nicolas-martin

View GitHub Profile
for i in {1..20}; do
vim --startuptime start$i.log;
done
find start* -exec grep STARTED {} \; | cut -d' ' -f1

Vim Keys

Movement

  • $ end of line
  • 0 Start of the line
  • { / } Jump to next / previous paragraph.

Deletion

  • dw Deletes the next word
@nicolas-martin
nicolas-martin / !condo.md
Last active September 1, 2016 19:47
Condo

3 Navy Wharf Crt 308 #15

Test

65 bremner #165

Test

Breadth first search

Uses a queue (FIFO)

var queue = new Queue<BinaryNode>();
queue.Enqueue(rootNode);
BinaryNode currentNode;

while (queue.Count != 0)
{
@nicolas-martin
nicolas-martin / funds.md
Last active February 12, 2016 20:13
fund research
Company % of Assets
BMO MSCI EAFE Hedged to CAD Idx ETF 24.6%
BMO S&P 500 Index ETF 24.4%
BMO S&P/TSX Capped Comp Index ETF 15.0%
BMO MSCI EAFE Index ETF 14.6%
BMO MSCI Emerging Markets Index ETF 7.9%
BMO NASDAQ 100 Hedged Index ETF 5.6%
using (var connection = new MySqlConnection("Server=localhost;Database=MyDatabaseName;Uid=root;Pwd=;"))
using (var command = connection.CreateCommand()) {
connection.Open();
command.CommandText = "select id, name from widgets";
using (var reader = command.ExecuteReader())
while (reader.Read())
Console.WriteLine(reader.GetString(0) + ": " + reader.GetString(1));
}