Skip to content

Instantly share code, notes, and snippets.

View tomekowal's full-sized avatar

Tomasz Kowal tomekowal

  • Kraków, Poland
View GitHub Profile
View main.rs
use crossterm::{
event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
fmt,
io,
env
View teller.live
# Teller Bank Challenge
```elixir
Mix.install([:req, :jason, :kino, :decompilerl])
```
## Your Solution
```elixir
username = Kino.Input.text("Username") |> Kino.render()
View evented_discussion.md

Goal

Increase speed and throughput without sacrificing quality.

Aggregate size

A problem with current solution with "small" aggregates.

sequenceDiagram
	participant Bridge
View tui.exs
Mix.install([{:ratatouille, "~> 0.5.0"},
{:keymap, github: "tomekowal/keymap", ref: "master"}])
defmodule SwissArmyKnife do
defmodule Model do
defstruct [:bc_dev_domain, :menu]
end
@behaviour Ratatouille.App
View Elixir_compilation.md

Exploring Elixir compiler

Elixir language is a love child of Ruby and Erlang giving you the best of both worlds: easy concurrency and programmer friendliness with advanced metaprogramming capabilities. Running tests concurrently enhances development cycle time. Nothing comes without drawbacks though. Compilation time is usually quite big. It doesn't matter that much during development because you compile only changed files. However, building from scratch takes time which might hurt CI time.

View StarCraft powershell beeper
$player = New-Object System.Media.SoundPlayer "$env:windir\Media\notify.wav"
while ($true) {$player.Play(); sleep 5}
View frequency.erl
%% Based on code from
%% Erlang Programming
%% Francecso Cesarini and Simon Thompson
%% O'Reilly, 2008
%% http://oreilly.com/catalog/9780596518189/
%% http://www.erlangprogramming.org/
%% (c) Francesco Cesarini and Simon Thompson
-module(frequency).
-export([start/1,allocate/0,deallocate/1,stop/0]).
@tomekowal
tomekowal / pure-impure.md
Last active August 12, 2020 10:05
Pure vs impure
View pure-impure.md

Pure vs impure and why should I care?

Some of the most important advancements in programming came from adding restrictions to the way we program. Famous article by Edsger Dijkstra Go To Statement Considered Harmful shows how introducing one statement into programming language breaks many nice properties of that language. goto gives us freedom and solves couple of simple problems like breaking from nested loops easily, but it can make programs very hard to understand. This happens, because we cannot look at two pieces of code in spearation. The execution can jump to some other place in code or even worse: it can jump from other piece of code to here and We need to keep that in mind.

View keybase.md

Keybase proof

I hereby claim:

  • I am tomekowal on github.
  • I am tomekowal (https://keybase.io/tomekowal) on keybase.
  • I have a public key ASCk705vXgZsnsLdeGNcRH_JNbDbFXwGKck1eOHcUbHrSgo

To claim this, I am signing this object:

View SimpleAuthServer.py
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
import ssl
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''