Skip to content

Instantly share code, notes, and snippets.

@Lazzlo2096
Lazzlo2096 / gist:b90b195525d7f0c701b3f9bf4a7800bb
Last active April 9, 2018 12:47
How compile fdupes on windows (but no!)
// https://github.com/libressl-portable/portable/blob/master/include/compat/sys/stat.h
// Dont forget place file "portable_endian.h" from https://gist.github.com/panzi/6856583 in /md5 directory
// This make fdupes compile, but it still dosen't work on windows (I think trouble in file API or something like)
// https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx
// https://arrayfire.com/cross-compile-to-windows-from-linux/
diff --git a/Makefile b/Makefile
index bc5ff54..1cb3925 100644
--- a/Makefile
{-# LANGUAGE DeriveFunctor #-}
import Data.Functor
data SomeThingElse a = Some a | Thing
deriving (Functor, Show)
-- 5 <$ Just () == Just 5
-- 5 <$ Some () == Some 5
@Lazzlo2096
Lazzlo2096 / prekek.hs
Created August 1, 2018 15:06
Has Pre kek 0.1
-- Int : 1,2,3,..
data Qwe = Non1 | Non2 deriving( Show )
data As = AA Int | SS Qwe deriving( Show )
----data As2 a = AAA (Just Int) | SSS (Just Qwe)
data As2 = AAA (Maybe Int) | SSS (Maybe Qwe) deriving( Show )
----f :: Int of Qwe -> (Maybe Int or Maybe Qwe)
f :: As -> As2
f (AA a) = AAA (Just a)
@Lazzlo2096
Lazzlo2096 / *.hs
Created August 2, 2018 14:03
Новые вопросы Hs 2018.08.02
f :: p -> p
f z = z
data MyT = O Int | T Char deriving(Show)
data MyT2 = O2 Int | T2 Char deriving(Show)
g :: MyT -> MyT
g z = z
-- f O 3
using System;
using System.Runtime.InteropServices; //Guid
namespace CSharp_COMObject
{
//using System.Runtime.InteropServices;
[Guid("E7C52644-7AF1-4B8B-832C-23816F4188D9")]
public interface CSharp_Interface
{
@Lazzlo2096
Lazzlo2096 / main.cpp
Last active August 9, 2018 14:21
Hello boost
// https://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html
//cl /EHsc /I path\to\boost_1_66_0 path\to\example.cpp
//g++ -I "C:\boost_1_66_0" ./main.cpp
//echo 1 2 3 | ./a.exe
//https://nuwen.net/mingw.html
//g++ -I "C:\MinGW\include" ./main.cpp
#include <boost/lambda/lambda.hpp>
#include <iostream>

Содержание по проектам по моему Githab'у:

Норм проекты, но есть недочёты, нужно доделать (да ведь?):
Chess-parakeet
tempNote

Переписать на другой язык:
vocabulary-verge

Быстрые примеры и helloWorld'ы:\

@Lazzlo2096
Lazzlo2096 / crc32.c
Created November 14, 2018 18:51 — forked from Jessidhia/crc32.c
CRC32 summer in C; unicode-compatible on windows
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#define CHUNK_SIZE 4096
#ifdef _WIN32
#include <wchar.h>
#include <io.h>
#define WIN32_LEAN_AND_MEAN
@Lazzlo2096
Lazzlo2096 / fdupes-xenon tasks.txt
Last active March 5, 2019 19:26
Tasks of making 'fdupes-xenon' utility
https://github.com/Lazzlo2096/fdupes-xenon
Необходимость: [maybe]\[want]\[need]\[necessary]
Сложность: [easy]\[mid]\[hard]
* - первоочередные задачи (без которых не былобы этой проги)
WIP x 1
DONE x 2
----------------------------------------------
1) __old age__
@Lazzlo2096
Lazzlo2096 / main.rs
Last active November 25, 2018 20:10
Rust Practice
fn dna_to_rna(dna: &str) -> String {
// dna.chars().map(|c| match c { 'T' => 'U', _ => c } ).collect()
// dna.chars().map(|c| { match c { 'T' => 'U', c => c, } } ).collect()
dna.replace("T", "U")
}
// https://www.codewars.com/kata/reviews/5824a92c5ce9e05d7700000e/groups/5be0706b2934eb31570049b1
// https://www.codewars.com/kata/reviews/5824a92c5ce9e05d7700000e/groups/5b7aba0b0da8ff76920006e4