Skip to content

Instantly share code, notes, and snippets.

View hryniuk's full-sized avatar
🗿

Łukasz hryniuk

🗿
View GitHub Profile
@hryniuk
hryniuk / .gitconfig
Created March 29, 2023 06:02
git config
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
@hryniuk
hryniuk / slope_vs_starting.md
Created August 10, 2021 11:51 — forked from gtallen1187/slope_vs_starting.md
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@hryniuk
hryniuk / create_post.exs
Created February 7, 2021 13:25 — forked from stevedomin/create_post.exs
Using UUIDs as primary key with Ecto
defmodule MyBlog.Repo.Migrations.CreatePost do
use Ecto.Migration
def change do
create table(:posts, primary_key: false) do
add :id, :uuid, primary_key: true
add :body, :string
add :word_count, :integer
timestamps
==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@hryniuk
hryniuk / bret_victor-reading_list.md
Created January 4, 2021 22:44 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

package main
import (
"flag"
"log"
"os"
"syscall"
"unsafe"
"path/filepath"
"bufio"
package main
import (
"flag"
"log"
"os"
"syscall"
"unsafe"
"path/filepath"
"bufio"
@hryniuk
hryniuk / a-usage.md
Created September 29, 2020 21:17 — forked from t4sk/a-usage.md
gen_tcp and GenServer example in Elixir (1.5.2)

gen_tcp and GenServer example in Elixir (1.5.2)

Usage

server.ex

Server.start
@hryniuk
hryniuk / main.go
Created December 13, 2019 10:22 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@hryniuk
hryniuk / spr
Created June 20, 2018 12:35
Run tests agains given task (e.g. Codeforces)
#!/bin/bash
n=$1
g++ -o ${n} ${n}.cpp -std=c++14 -O2
for i in {0..10} ; do
if [[ -e ${n}${i}.in ]] ; then
./${n} < ${n}${i}.in > ${n}${i}.xd
diff -w -q ${n}${i}.xd ${n}${i}.out