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
#!/usr/bin/python3 | |
# | |
# Configure metalink URL query parameters for system DNF repositories | |
# Copyright (C) 2023 Jinoh Kang | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 2 of the License, or | |
# (at your option) any later version. | |
# |
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
#define WIN32_LEAN_AND_MEAN | |
#define WINVER 0x0601 | |
#define _WIN32_WINNT 0x0601 | |
#include <windows.h> | |
HBITMAP argb8888_to_pargb8888(HBITMAP hbm, HDC hdc) | |
{ | |
const BLENDFUNCTION blendfn = { AC_SRC_OVER, 0, 0xff, AC_SRC_ALPHA }; | |
HDC hdcSrc, hdcTmp1, hdcTmp2; | |
HBITMAP hbmRes = NULL, hbmTmp1, hbmTmp2; |
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
CC = gcc | |
CFLAGS = -O2 -g -shared -fPIC -Wall $(EXTRACFLAGS) | |
LDFLAGS = -Wl,-z,now,-z,relro $(EXTRALDFLAGS) | |
LIBS = -lunwind-x86_64 -lpthread | |
all: libmain.so | |
libmain.so: main.c | |
$(CC) $(CFLAGS) -o libmain.so main.c $(LDFLAGS) $(LIBS) |
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
#define _FILE_OFFSET_BITS 64 | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdarg.h> | |
#include <string.h> | |
#include <limits.h> | |
#include <unistd.h> | |
#include <signal.h> | |
#include <errno.h> |
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
import struct | |
PROP_STRUCT = struct.Struct("<3I") | |
# {{{ constants | |
PROP_IDS = { | |
1: "KEY_PROV_HANDLE", |
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
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE | |
#endif | |
#ifndef _FILE_OFFSET_BITS | |
#define _FILE_OFFSET_BITS 64 | |
#endif | |
#define _LARGEFILE64_SOURCE |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <dirent.h> |
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
module ContLabel where | |
import Control.Monad.Trans.Cont | |
import Control.Monad.IO.Class | |
type Jmp r m a = (Maybe a, Label r m a) | |
newtype Label r m a = Label (Jmp r m a -> m r) | |
setjmp :: ContT r m (Jmp r m a) | |
setjmp = ContT $ \ c -> c (Nothing, Label 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
{-# OPTIONS_HADDOCK show-extensions #-} | |
{-# LANGUAGE CPP #-} | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
----------------------------------------------------------------------------- | |
-- | | |
-- Module : Data.PureRef | |
-- Copyright : (c) Jinoh Kang, 2019 | |
-- License : MIT |
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
module Main where | |
import Control.Applicative | |
import Control.Exception | |
import Data.List | |
import Data.Char | |
import qualified Data.Map as Map | |
import System.IO | |
import System.IO.Error | |
import System.Environment |
NewerOlder