Skip to content

Instantly share code, notes, and snippets.

View fikovnik's full-sized avatar

Filip Krikava fikovnik

View GitHub Profile
@amaembo
amaembo / Test.java
Created May 19, 2020 15:12
Reified generics in Java
import java.util.*;
@SuppressWarnings("ALL")
class Test {
static class ReifiedList<T> extends AbstractList<T> {
private final List<T> delegate = new ArrayList<>();
private final Class<?> type;
@SafeVarargs
ReifiedList(@Deprecated T... unused) {
@saitoha
saitoha / suckless-st-sixel.diff
Last active December 9, 2023 19:02
Add SIXEL graphics support for suckless st. (sixel.c/sixel_hls.c come from mintty, licensed under GPL)
commit ea830e03d4d4562b1ff225940f65bceddd9cad6c
Author: Hayaki Saito <saitoha@me.com>
Date: Sun Jun 11 23:46:45 2017 +0900
Add sixel graphics support
Signed-off-by: Hayaki Saito <saitoha@me.com>
diff --git a/Makefile b/Makefile
index d8595fe..a25d040 100644
@gyribeiro
gyribeiro / tmux_italic.md
Last active March 5, 2024 12:05
enable italic font on tmux
@RobBlackwell
RobBlackwell / configuration.nix
Last active July 19, 2021 06:27
NixOS on Dell XPS 13
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@DamienCassou
DamienCassou / configuration.nix
Created October 22, 2014 13:41
configuration.nix file for NixOS on my macbook pro
{ config, pkgs, ... }:
let
hostname = "luz3";
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# I use VirtualBox to connect to Windows and Linux guests
@vmarcinko
vmarcinko / EmbeddedKafkaCluster.java
Created August 16, 2014 13:34
Embedded Zookeeper & Kafka cluster
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
@even4void
even4void / .emacs
Last active September 6, 2018 15:26
A basic previewer for R Markdown files edited with Emacs
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.rmd\\'" . markdown-mode))
(add-hook 'markdown-mode-hook 'turn-on-outline-minor-mode)
(defun rmarkdown-new-chunk (name)
"Insert a new R chunk."
(interactive "sChunk name: ")
(insert "\n```{r " name "}\n")
(save-excursion
@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@jboner
jboner / latency.txt
Last active April 25, 2024 11:20
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD