Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Liam Huang Liam0205

🎯
Focusing
View GitHub Profile
@Liam0205
Liam0205 / access_member_pointer.cc
Last active Oct 11, 2020
Implementation of `operator->*` for `std::shared_ptr`
View access_member_pointer.cc
#include <iostream>
#include <functional>
#include <type_traits>
#include <cstddef>
#include <utility>
#include <memory>
namespace yuuki {
template<size_t> // begin with 0 here!
struct placeholder_template
View ltxtest-platex-ng.log
$ platex-ng ltxtest
This is pTeX-ng, Version 3.14159265 (preloaded format=platex-ng)
entering extended mode
(ltxtest.tex
pLaTeX2e <2020-04-12u03> (based on LaTeX2e <2020-02-02> patch level 5)
(/usr/local/texlive/2020/texmf-dist/tex/latex/ctex/ctexart.cls
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3kernel/expl3-code.tex
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3kernel/l3deprecation.def))
! Undefined control sequence.
View chapter_heading.tex
\documentclass{ctexbook}
\usepackage{calc}
% \usepackage{geometry}
% \geometry{showframe}
\usepackage{colortbl}
\definecolor{titlecolor}{rgb}{0.503906,0.503906,0.734375}
\ctexset {
chapter = {
beforeskip = 0pt,
fixskip = true,
View enumitem_demo.tex
\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate,2]{label=\arabic*)}
\begin{document}
\begin{enumerate}
\item one
\begin{enumerate}
\item one
\item two
\end{enumerate}
View remove_vertical_spacing_of_list_in_cell.tex
\documentclass[11pt, a4paper]{article}
\usepackage{ctex}
\usepackage{pifont}
\usepackage{array}
\usepackage{enumitem}
\usepackage{varwidth}
\newlist{tabitemize}{itemize}{1}
\setlist[tabitemize]{label=\ding{118},nosep,after=\strut}
@Liam0205
Liam0205 / example.md.txt
Last active Mar 29, 2020
writing markdown in LaTeX by using the markdown package
View example.md.txt
# I'm a markdown file.
And I can do *emphasis*.
## With sub-headers
> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
View markdown_test.tex
\documentclass[UTF8]{ctexart}
\usepackage{zhlipsum}
\usepackage{markdown}
\markdownSetup{
renderers = {
link = {#1}, % Render a link as the link label.
emphasis = {\emph{#1}}, % Render emphasis using `\emph`.
},
hybrid = true,
fencedCode=true,
@Liam0205
Liam0205 / # systemd - 2020-02-03_10-02-01.txt
Created Feb 3, 2020
systemd on 2.6.32-754.2.1.el6.x86_64 - Homebrew build logs
View # systemd - 2020-02-03_10-02-01.txt
Homebrew build logs for systemd on 2.6.32-754.2.1.el6.x86_64
Build date: 2020-02-03 10:02:01
@Liam0205
Liam0205 / # systemd - 2020-01-20_15-18-26.txt
Created Jan 20, 2020
systemd on 2.6.32-754.2.1.el6.x86_64 - Homebrew build logs
View # systemd - 2020-01-20_15-18-26.txt
Homebrew build logs for systemd on 2.6.32-754.2.1.el6.x86_64
Build date: 2020-01-20 15:18:26
View random_choice.cc
#include <cassert>
#include <cmath>
#include <iostream>
#include <random>
#include <algorithm>
#include <limits>
#include <functional>
#include <map>
#include <vector>
#include <queue>