Skip to content

Instantly share code, notes, and snippets.

Zheng Luo htfy96

Block or report user

Report or block htfy96

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
htfy96 /
Last active Jun 2, 2018

2000 strings, all 'aaaaaaaaa'

["aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaaaa", "aaaaaaa
htfy96 /
Last active May 15, 2018
Simple bookmarklet to send current webpage to dyweb/weekly

Add the following target to your bookmark bar.

Remember to replace %24YOUR_TOKEN_HERE with your Github personal access token. The token could be acquired at Settings -> Developer Settings -> Personal Access Token and check public_repo permission.

htfy96 /
Last active Dec 27, 2017
A collection of my bad rendering results
htfy96 /
Last active Dec 11, 2017
-Osuperfast: gcc optimization flags used in our project
CXXFLAGS="-ffast-math -fdevirtualize-speculatively  -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math -fipa-pta -mrecip=all -fgcse-sm -fgcse-las -fgcse-after-reload -march=native  -ftree-vectorize -floop-interchange -floop-block -ftree-coalesce-vars -floop-nest-optimize -fgraphite-identity -ftree-loop-ivcanon -fivopts" LDFLAGS="-ffast-math -fdevirtualize-speculatively"


Basic O3 + -march=native

rendering time = 91ms

Basic O3 + -march=native + -ffast-math + -mrecip=all

rendering time = 92ms

htfy96 / gdb_cquery.log
Created Nov 19, 2017
GDB log for cquery
View gdb_cquery.log
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7f7c5e0c3740 (LWP 11427) "querydb" 0x00007f7c5a696756 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/
2 Thread 0x7f7c5936a700 (LWP 11428) "stdin" 0x00007f7c598caa98 in read () from /usr/lib/
3 Thread 0x7f7c58b69700 (LWP 11429) "stdout" 0x00007f7c5a696756 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/
4 Thread 0x7f7c48368700 (LWP 11430) "completequery" 0x00007f7c5a69143d in pthread_join () from /usr/lib/
5 Thread 0x7f7c53fff700 (LWP 11431) "completeparse" 0x00007f7c5a69143d in pthread_join () from /usr/lib/
6 Thread 0x7f7c537fe700 (LWP 11432) "indexer0" 0x00007f7c5a696756 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/
7 Thread 0x7f7c52ffd700 (LWP 11433) "indexer1" 0x00007f7c5a696756 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/
8 Thread 0x7f7c527fc700 (LWP 11434) "indexer2


_GLIBCXX_CONCEPT_CHECKS, according to online doc of gcc, is a macro that performs compile-time checking on certain template instantiations to detect violations of the requirements of the standard. This macro has no effect for freestanding implementations.


#include <set>

struct A
htfy96 / gnome-shell.css
Created Oct 8, 2017
gnome-shell adapta theme css
View gnome-shell.css
/* This file is part of adapta-gtk-theme Copyright (C) 2016-2017 Tista <> 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. */
* { transition-property: border-color, border-image, background-color, background-image, box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 0.15s; }
*:focus { transition-duration: 0s; }
stage { font-size: 10pt; font-family: Roboto, Cantarell, Sans-Serif; font-weight: 400; color: #263238; }
.button { border-color: transparent; color: rgba(38, 50, 56, 0.87); background-color: transparent; box-shadow: 0 0 transparent; text-shadow: none; icon-shadow: none; padding: 7px 16px 8px; border-radius: 2px; border-width: 0; font-weight: 500; }
.button:hover { border-color: transparent; color: #263238; background-color: rgba(38, 50, 56, 0.12); box
htfy96 /
Last active Jan 17, 2020
static inline vs inline vs static in C++

In this article we compared different behavior of static, inline and static inline free functions in compiled binary. All the following test was done under g++ 7.1.1 on Linux amd64, ELF64.

Test sources


#pragma once

inline int only_inline() { return 42; }
static int only_static() { return 42; }
View init.vim
set shell=/bin/bash
syntax on
if &term =~ '^\(xterm\|screen\)$' && $COLORTERM == 'gnome-terminal'
set t_Co=256
filetype on
filetype plugin on
set autoindent
set nolazyredraw
set number
View call_n_times.cpp
#include <iostream>
#include <array>
#include <cassert>
using namespace std;
constexpr int f()
return 42;
You can’t perform that action at this time.