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 ad964f7eaef9c03ce68a01cfdd7fde9d56524868 Mon Sep 17 00:00:00 2001 | |
From: Martin Liska <mliska@suse.cz> | |
Date: Tue, 21 Dec 2021 17:43:55 +0100 | |
Subject: [PATCH] Support ld.mold linker. | |
gcc/ChangeLog: | |
* collect2.c (main): Add ld.mold. | |
* common.opt: Add -fuse-ld=mold. | |
* doc/invoke.texi: Document it. |
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
static size_t debug_itoa(int value, char *buf, unsigned int radix, int sign) { | |
int neg = 0; | |
char *pbuf = buf; | |
unsigned int i; | |
unsigned int len; | |
if (radix > 16) { | |
*buf = '\0'; | |
return 0; | |
} |
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 escript | |
% -*- erlang -*- | |
% | |
% Copyright 1999-2021 Gentoo Authors | |
% Distributed under the terms of the GNU General Public License v2 | |
% | |
% A small script to generate the ETS table that represents Rebar 3's | |
% package cache. | |
-module(gen_package_index). |
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
#!/bin/sh | |
set -e | |
set -u | |
CONFIG_DIR="$HOME/.config/runelite-${1:-main}" | |
RUNELITE_DIR="$HOME/src/runelite" | |
cd "$RUNELITE_DIR" |
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
#!/bin/sh | |
# Usage: format-irclog.sh <file> | |
# 1. Append two spaces to the end of each line. | |
# 2. Remove all characters before last `<`, e.g. `<matterbridge> <sgp> foo` becomes `<sgp> foo`. | |
# 3. Remove lines containing `⇐` (parts). | |
# 4. Remove lines containing `→` (joins). | |
# 5. Escape the `*` character, e.g. `*foo*` becomes `\*foo\*`. | |
# 6. Escape the `<` character, e.g. `<3` becomes `\<3`. |
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
(defun disable-scroll-bars (frame) | |
(modify-frame-parameters frame | |
'((vertical-scroll-bars . nil) | |
(horizontal-scroll-bars . nil)))) | |
(disable-scroll-bars frame-initial-frame) | |
(add-hook 'after-make-frame-functions #'disable-scroll-bars) |
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
find_path(LIBUV_INCLUDE_DIR NAMES uv.h) | |
mark_as_advanced(LIBUV_INCLUDE_DIR) | |
find_library(LIBUV_LIBRARY NAMES uv libuv) | |
mark_as_advanced(LIBUV_LIBRARY) | |
if(DEFINED LIBUV_INCLUDE_DIR AND EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") | |
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" _LIBUV_H REGEX | |
"#define UV_VERSION_(MAJOR|MINOR|PATCH) [0-9]+") | |
foreach(c MAJOR MINOR PATCH) |
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
find_path(HTTP_PARSER_INCLUDE_DIR NAMES http_parser.h) | |
mark_as_advanced(HTTP_PARSER_INCLUDE_DIR) | |
find_library(HTTP_PARSER_LIBRARY NAMES http_parser libhttp_parser) | |
mark_as_advanced(HTTP_PARSER_LIBRARY) | |
if(DEFINED HTTP_PARSER_INCLUDE_DIR) | |
file(STRINGS "${HTTP_PARSER_INCLUDE_DIR}/http_parser.h" _HTTP_PARSER_H REGEX | |
"#define HTTP_PARSER_VERSION_(MAJOR|MINOR|PATCH) [0-9]+") | |
foreach(c MAJOR MINOR PATCH) |
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
/* | |
* JsonRpcClient.js 1.0 - A Node.js JSON-RPC client | |
* | |
* Written in 2019 by Matt Smith <matt@offtopica.uk> | |
* | |
* To the extent possible under law, the author(s) have dedicated all | |
* copyright and related and neighboring rights to this software to | |
* the public domain worldwide. This software is distributed without | |
* any warranty. | |
* |
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
#!/bin/sh | |
# IN: deadbeef | |
# OUT: \xde\xad\xbe\xef | |
hexify() { | |
echo "$1" | fold -w 2 | sed -e 's/^/\\x/' | paste -s -d '' | |
} |
NewerOlder