Skip to content

Commit

Permalink
more stuff, including sanitizer scalability
Browse files Browse the repository at this point in the history
  • Loading branch information
matu3ba committed Jan 15, 2025
1 parent f55f1c7 commit d10b181
Show file tree
Hide file tree
Showing 21 changed files with 215 additions and 113 deletions.
5 changes: 4 additions & 1 deletion .config/nvim/lua/my_fmt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if not has_conform then return end

-- ruff_format: no cmd for combined linting and fmt yet https://github.com/astral-sh/ruff/issues/8232
-- stylua: cargo install stylua --features lua52
-- tex-fmt: cargo install tex-fmt
local fmts_by_ft = {
-- lsp_format = 'never(default)|fallback|prefer|first|last'
-- cmake = { 'cmake_format' },
Expand All @@ -25,8 +26,10 @@ local fmts_by_ft = {
lua = { 'stylua' }, -- stylua: ignore start|end
-- python = { 'ruff_format' }, -- # fmt: off|on, # fmt: skip
rust = { 'rustfmt', lsp_format = 'prefer' },
sh = { 'shfmt' },
-- sh = { 'shfmt' }, -- go not great language
shtml = { 'superhtml' },
-- https://github.com/WGUNDERWOOD/tex-fmt/issues/55
-- tex = { 'tex-fmt' }, -- % tex-fmt: off|on, % tex-fmt: skip
zig = { 'zigfmt', lsp_format = 'prefer' },
-- -- zig = { lsp_format = 'prefer' },
ziggy = { 'ziggy' },
Expand Down
4 changes: 3 additions & 1 deletion .config/nvim/lua/my_lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ if not ok_lint then return end
-- uv tool install weasyprint
-- uv tool install yt-dlp

-- idea https://github.com/codex-semantics-library/codex

--==installing pixi
-- git clone 'https://github.com/prefix-dev/pixi'
-- cargo install --locked --git https://github.com/prefix-dev/pixi.git pixi
Expand Down Expand Up @@ -54,7 +56,7 @@ lint.linters_by_ft = {
-- // NOLINTEND
-- // NOLINTBEGIN(errorclass)
-- somecode // NOLINT
c = { 'clangtidy' },
c = { 'clangtidy' }, -- codex
cpp = { 'clangtidy' },
-- luacheck: push ignore
-- luacheck: pop ignore
Expand Down
6 changes: 3 additions & 3 deletions .config/nvim/lua/my_lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ local aucmd_lsp = vim.api.nvim_create_augroup('aucmds_lsp', { clear = true })
-- 'bashls', -- 'bash-language-server'
-- 'biome' -- 'biome'
-- 'jedi_language_server', -- 'jedi-language-server' prefer ruffs server
-- 'ltex', -- 'ltex-ls'
-- 'clangd', -- 'clangd'
-- 'lemminx', -- 'lemminx'
-- 'omnisharp' -- 'omnisharp'
-- 'texlab' -- 'texlab'
--
-- pip3 install -U --user jedi-language-server
-- pipx install jedi-language-server
Expand Down Expand Up @@ -135,12 +135,12 @@ lspconfig.texlab.setup {
on_attach = common_on_attach,
settings = {
texlab = {
auxDirectory = { 'build' },
build = {
--args = { '-pdflatex=lualatex', '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' }
--args = { '-pdflatex=lualatex', '-pdf', '-interaction=nonstopmode', '-synctex=1', '-outdir=build', 'main.tex' }
args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '-outdir=build', 'main.tex' },
args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '-outdir=build', '%f' },
},
latexFormatter = 'none',
},
},
}
Expand Down
5 changes: 3 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn build(b: *std.Build) !void {
// Ps1 | - | - | - | - | -
// Py | - | - | - | - | -
// Rs | - | - | - | - | -
// Sh | y | y | n | n | n
// Sh | n | y | n | n | n
// Tex | n | n | n | y | n
// Zig | y | y | n | y | y

Expand Down Expand Up @@ -312,7 +312,8 @@ fn lintLua(b: *std.Build, run_step: *std.Build.Step) void {
// fn checkRs() void {} // nofmt nolint nobuild noproj

fn fmtSh(b: *std.Build, run_step: *std.Build.Step) void {
// shfmt has no way to disable fmt / check mode, so it is not enabled
// go bad
// shfmt has no way to disable fmt / has no check mode, so it is not enabled
_ = b;
_ = run_step;
// for (SingleShFiles[0..]) |shfile| {
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# toolchain. Reason:
#
# Only `libc++` is supported
# See also https://gitlab.kitware.com/cmake/cmake/-/issues/25965

# set CXXFLAGS -stdlib=libc++
# CXXFLAGS=-stdlib=libc++
Expand Down
37 changes: 19 additions & 18 deletions src/smartcv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
}

\pagestyle{empty} % no page numbers
Expand All @@ -22,7 +22,8 @@
\def \nameskip {\smallskip} % space after name
\def \addresssep {$\diamond$} % const
\def \addressskip {\smallskip} % space between two address lines
\def \rSectionlineskip {\smallskip} % space above horizontal line for each section
\def \rSectionlineskip {\smallskip} % space above horizontal line for
% each section
\def \rSectionskip {\smallskip} % space after heading section

\let \@name \relax % var
Expand All @@ -36,8 +37,8 @@
% \printaddress to style address line
\def \printaddress #1{
\begingroup
\def \\ {\addresssep\ }
\centerline{#1}
\def \\ {\addresssep\ }
\centerline{#1}
\endgroup
\par
\addressskip
Expand All @@ -46,8 +47,8 @@
% \printname to print name as page header
\def \printname {
\begingroup
\hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
\nameskip\break
\hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
\nameskip\break
\endgroup
}

Expand All @@ -56,18 +57,18 @@
\renewcommand{\document}{
\ori@document % document start
\@ifundefined{@name} { \@latex@error
{Variable '@name' is undefined.}
{Use \ name{Name Surname}.}
{Variable '@name' is undefined.}
{Use \ name{Name Surname}.}
}{ \printname
}
\@ifundefined{@addressOne} { \@latex@error
{Variable '@addressOne' is undefined.}
{Use \ addrone{+phone \\ place}.}
{Variable '@addressOne' is undefined.}
{Use \ addrone{+phone \\ place}.}
}{ \printaddress{\@addressOne}
}
\@ifundefined{@addressTwo} { \@latex@error
{Variable '@addressTwo' is undefined.}
{Use \ addrtwo{\href{link1}{descr1} \\ ..}.}
{Variable '@addressTwo' is undefined.}
{Use \ addrtwo{\href{link1}{descr1} \\ ..}.}
}{ \printaddress{\@addressTwo}
}
}
Expand All @@ -79,9 +80,9 @@
\rSectionlineskip
\hrule % horizontal line
\begin{list}{}{ % list for each section item
\setlength{\leftmargin}{0cm} % margin within section
}
\setlength{\leftmargin}{0cm} % margin within section
}
\item[]
}{
}{
\end{list}
}
102 changes: 54 additions & 48 deletions src/smartcv_example.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
% SPDX-License-Identifier: 0BSD
% latexmk -pvc -pdflatex='lualatex --file-line-error --synctex=1' -pdf -outdir=build src/smartcv_example.tex
% dont use, breaks on %-strings in href, see https://github.com/WGUNDERWOOD/tex-fmt/issues/55
% tex-fmt src/smartcv_example.tex
% cargo install tex-fmt; tex-fmt src/smartcv_example.tex
% latexmk -pvc -pdflatex='lualatex --file-line-error --synctex=1'
% -pdf -outdir=build src/smartcv_example.tex
% LuaTEX Reference Manual
% https://en.wikibooks.org/wiki/TeX
% idea: docs on internal commands like \@ifundefined \@latex@error
Expand All @@ -9,7 +13,8 @@
\usepackage[left=1cm,top=1cm,right=1cm,bottom=1cm]{geometry} % Document margins
\usepackage{enumitem} % \begin{itemize}[noitemsep, notopsep=0pt] \end{itemize}
% itemize adjustments <<<< Adjust here
\setlist{nosep,topsep=-\parskip} % eliminate itemize space without changing \parskip, dep enumitem
\setlist{nosep,topsep=-\parskip} % eliminate itemize space without
% changing \parskip, dep enumitem

\name{Name Surname} % Your name
\addrone{+phone \\ place}
Expand All @@ -19,81 +24,82 @@
\href{https://example.invalid}{example.invalid} \\
\href{https://github.com/invalid}{github.com/invalid}
} %
%Testing, Formal Methods, Site Reliability Engineering, Observability, and Infrastructure.
%Testing, Formal Methods, Site Reliability Engineering,
% Observability, and Infrastructure.
\begin{document}

%OBJECTIVE
\begin{rSection}{OBJECTIVE}

Software Engineer with X+ years of work experience in something1, something2
and something3 seeking full-time something roles focused on cool stuff to do.
Software Engineer with X+ years of work experience in something1, something2
and something3 seeking full-time something roles focused on cool stuff to do.

\end{rSection}

%TECHNICAL_STRENGTHS
\begin{rSection}{SKILLS}

\begin{tabular}{ @{} >{\bfseries}l @{\hspace{6ex}} l }
Technical Skills & BuildOps, DevOps, Some1, Some2, Some3
\\
Soft Skills & How character fits to the job, customer or team \\
Low level languages & C, Some1, Some2, Some3\\
High level languages & Some1, Some2, Various Shells\\
\end{tabular}\\
\begin{tabular}{ @{} >{\bfseries}l @{\hspace{6ex}} l }
Technical Skills & BuildOps, DevOps, Some1, Some2, Some3
\\
Soft Skills & How character fits to the job, customer or team \\
Low level languages & C, Some1, Some2, Some3\\
High level languages & Some1, Some2, Various Shells\\
\end{tabular}\\
\end{rSection}

\begin{rSection}{WORK EXPERIENCE}

\textbf{Software Engineer Y} \hfill Nov 20XY - present\\
company1 \hfill \textit{place1}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}

\textbf{Software Engineer X} \hfill Jun 20XY - Oct 20XY\\
company2 \hfill \textit{place2}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}
\textbf{Software Engineer Y} \hfill Nov 20XY - present\\
company1 \hfill \textit{place1}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}

\textbf{Software Engineer X} \hfill Jun 20XY - Oct 20XY\\
company2 \hfill \textit{place2}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}

\end{rSection}

%====EDUCATION
\begin{rSection}{Education}
{\bf Master of Computer Science}, university \hfill {Oct 20XY - Apr 20XY}\\
Master Thesis on description (tool), Focus Embedded and Medicine\\
{\bf Bachelor of Computer Science}, university \hfill {Oct 20XY - Mar 20XY}\\
Bachelor Thesis on description (tool)
%Minor in Linguistics \smallskip \\
%Member of Eta Kappa Nu \\
%Member of Upsilon Pi Epsilon \\
{\bf Master of Computer Science}, university \hfill {Oct 20XY - Apr 20XY}\\
Master Thesis on description (tool), Focus Embedded and Medicine\\
{\bf Bachelor of Computer Science}, university \hfill {Oct 20XY - Mar 20XY}\\
Bachelor Thesis on description (tool)
%Minor in Linguistics \smallskip \\
%Member of Eta Kappa Nu \\
%Member of Upsilon Pi Epsilon \\
\end{rSection}

%====OPEN_SOURCE_WORK_AND_PROJECTS
\begin{rSection}{OPEN SOURCE WORK AND PROJECTS}
% \vspace{-1.25em}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}
% \vspace{-1.25em}
\begin{itemize}
% \itemsep -2pt {}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}

\end{rSection}

%====TEACHING_AND_CONSULTING
\begin{rSection}{TEACHING AND CONSULTING}
\begin{itemize}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}
\begin{itemize}
\item brag item1
\item brag item2
\item brag item3
\end{itemize}

\end{rSection}

Expand Down
3 changes: 3 additions & 0 deletions templates/ai_tools
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ TODO Train writing short mails.

fish prompt, no idea how useful
https://github.com/Realiserad/fish-ai

https://haystack.deepset.ai/
pdftotext: simplify table of content, use known keywords, use llm for synonyms
11 changes: 7 additions & 4 deletions templates/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,12 @@ size_t getFileSize(char const *file_path) {
file = fopen(file_path, "rb");
if (file == NULLPTR)
exit(1); // could not open file, better use file handle
fseek(file, 0u, SEEK_END);
(void)fseek(file, 0u, SEEK_END);
long file_size_or_err = ftell(file);
if (file_size_or_err < 0)
exit(1); // invalid file size
fseek(file, 0u, SEEK_SET);
(void)fseek(file, 0u, SEEK_SET);
(void)fclose(file);
return (size_t)file_size_or_err;
}

Expand Down Expand Up @@ -1018,8 +1019,10 @@ void ape_win_print(void) {
#ifndef _WIN32
void ape_print(void) {
FILE *f1 = fopen("file1", "a+");
fprintf(f1, "sometext\n");
fclose(f1);
if (f1 != NULLPTR) {
fprintf(f1, "sometext\n");
fclose(f1);
}
}
#endif

Expand Down
Loading

0 comments on commit d10b181

Please sign in to comment.