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
| <Window x:Class="databinding.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:local="clr-namespace:databinding" | |
| mc:Ignorable="d" | |
| Title="MainWindow" | |
| Height="450" | |
| Width="400"> |
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
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Diagnostics; | |
| using System.Collections.Concurrent; | |
| namespace wordcounter | |
| { | |
| class Program | |
| { |
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
| using System; | |
| using System.CodeDom.Compiler; | |
| using Microsoft.CSharp; | |
| using System.Reflection; | |
| namespace dynamiccompilation | |
| { | |
| class Program | |
| { |
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
| using System; | |
| using Npgsql; | |
| namespace learningcsharp | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var connString = "Host=localhost;Username=arete;Database=arete"; |
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
| import sys | |
| import io | |
| import traceback | |
| import socketserver | |
| class EvaluationHandler(socketserver.BaseRequestHandler): | |
| def handle(self): | |
| while True: | |
| path = self.request.recv(2048).strip() |
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
| # http://stackoverflow.com/a/1667114 | |
| # https://kristerw.blogspot.com/2017/09/useful-gcc-warning-options-not-enabled.html | |
| # various other places | |
| CFLAGS = -Wall -Wextra -Wshadow -Werror -Wfatal-errors -pedantic -std=gnu11 -m64 \ | |
| -Wno-missing-braces -Wno-missing-field-initializers -Wformat=2 \ | |
| -Wswitch-default -Wswitch-enum -Wcast-align -Wpointer-arith \ | |
| -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline \ | |
| -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code \ | |
| -Wlogical-op -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \ | |
| -Wold-style-definition -Wduplicated-cond -Wduplicated-branches -Wrestrict \ |
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://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 | |
| disable root login: https://askubuntu.com/questions/27559/how-do-i-disable-remote-ssh-login-as-root-from-a-server | |
| setup remote postgres login (yes, I used a strong, randomly generated password): | |
| https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands | |
| https://bosnadev.com/2015/12/15/allow-remote-connections-postgresql-database-server/ |
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
| # download chrome manually | |
| # java (using default-jdk gave SSL errors with gradle https://askubuntu.com/questions/971059/17-10-openjdk-and-oracle-jdk-8-and-9-the-trustanchors-parameter-must-be-non-empt) | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get install oracle-java8-installer | |
| # download and install intellij manually | |
| # fonts |
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
| class WhatCouldGoWrong<T, U> { | |
| T t; | |
| U u; | |
| public void set(T t) { | |
| this.t = t; | |
| } | |
| public void set(U u) { | |
| this.u = u; |
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
| example output from running scripts in https://github.com/fearofcode/nyc-taxi-data follows. | |
| base script, 2tb HDD, vanilla postgres settings fresh from ubuntu install. 4 CPUs, 8 GB VM RAM. ubuntu 16.04, postgres 10. | |
| sedding a 14 million line CSV and then COPYing it in: | |
| Thu Dec 21 23:30:18 PST 2017: beginning load for data/yellow_tripdata_2009-01.csv | |
| COPY 14092413 | |
| Thu Dec 21 23:34:57 PST 2017: finished raw load for data/yellow_tripdata_2009-01.csv |