Skip to content

Instantly share code, notes, and snippets.

Sergii Rudchenko rudchenkos

Block or report user

Report or block rudchenkos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rudchenkos
rudchenkos / sha1sum.c
Last active Apr 20, 2018
Fast SHA1 calculation on files
View sha1sum.c
/* cc -Wpedantic sha1sum.c -osha1sum $(shell pkg-config --cflags --libs libcrypto) */
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <openssl/sha.h>
#include <stdio.h>
@rudchenkos
rudchenkos / FindFiles.hs
Created Apr 20, 2018
Microframework for file search
View FindFiles.hs
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
module Main where
import Data.Monoid
import System.Directory
import System.FilePath
import Control.Monad (filterM)
import System.Process (callProcess)
View Telwoorden.hs
module Language.Dutch.Telwoorden where
telwoord :: Integer -> String
telwoord 0 = "nul"
telwoord 1 = "een"
telwoord 2 = "twee"
telwoord 3 = "drie"
telwoord 4 = "vier"
telwoord 5 = "vijf"
telwoord 6 = "zes"
@rudchenkos
rudchenkos / CenterCropDrawable.java
Created Jul 14, 2017
Maintain aspect ratio of bitmap drawables set as windowBackground on Android
View CenterCropDrawable.java
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
You can’t perform that action at this time.