This file contains 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
#pragma once | |
#include <memory> | |
#include <optional> | |
template <typename k_type, typename v_type> | |
class tree | |
{ | |
enum color : bool |
This file contains 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
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -g default-terminal screen-256color | |
# Keep your finger on ctrl, or don't | |
bind-key ^D detach-client | |
# Create splits and vertical splits |
This file contains 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 Control.Monad.State | |
type Coins = [Int] | |
type StMatch a = StateT Coins IO a | |
nextCoin :: Int -> StMatch Int | |
nextCoin amount = do | |
c:cs <- get | |
if amount >= c |
This file contains 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
from importlib import import_module, resources | |
PLUGINS = {} | |
def register_plugin(f): | |
PLUGINS[f.__name__] = f | |
return f |
This file contains 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
# 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 |
This file contains 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
From 8bc692c33ec2e324e4400576d105495fa33f2ba9 Mon Sep 17 00:00:00 2001 | |
From: Alexey Slaykovsky <alexey@slaykovsky.com> | |
Date: Sat, 12 May 2018 11:38:53 +0200 | |
Subject: [PATCH] Read content from a request | |
Now it reads the content from an incoming request. | |
Also changed formatting to fit the Go standards. | |
And changed PUT to POST for a createContent handling. :) |
This file contains 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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="pattern"> | |
<edit mode="assign" name="dpi"> | |
<double>96</double> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="autohint"> |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module Main where | |
import Control.Arrow | |
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad.Reader | |
import Data.Either |
This file contains 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
;;; package --- Summary | |
;;; Commentary: | |
;;; Use it on your own risk :) | |
;;; Code: | |
(setq gc-cons-threshold 64000000) | |
(add-hook 'after-init-hook #'(lambda () (setq gc-cons-threshold 800000))) | |
;;; global vars | |
(setq |
This file contains 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
public Transaction[] handleTxs(Transaction[] possibleTxs) { | |
Set<Transaction> sortedTxs = new TreeSet<>( | |
(x, y) -> Double.compare(this.makeTxFees(y), this.makeTxFees(x))); | |
Collections.addAll(sortedTxs, possibleTxs); | |
Set<Transaction> validTxs = new HashSet<>(); | |
sortedTxs.parallelStream().filter(this::isValidTx).map(tx -> { | |
validTxs.add(tx); | |
tx.getInputs().parallelStream().map(in -> { |
NewerOlder