documents: init
add cv the way jasper does it Signed-off-by: Amneesh Singh <natto@weirdnatto.in>master
parent
002469acde
commit
849861bae2
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: Curriculum Vitae
|
||||
---
|
||||
|
||||
#+begin_export html
|
||||
<h1>Curriculum Vitae</h1> - Go <a href="/documents/cv.pdf">here</a> for the pdf <hr>
|
||||
#+end_export
|
||||
|
||||
* _About_
|
||||
- Amneesh Singh
|
||||
- [[mailto:natto@weirdnatto.in][natto@weirdnatto.in]]
|
||||
- [[https://weirdnatto.in][weirdnatto.in]]
|
||||
|
||||
Hello, I am Amneesh Singh, I also go by =natto1784= online. I live in Delhi, India; and do random stuff. I am more of a "system-administrator" type of guy by nature, but when it comes to programming, I want to do it all low-level; unless it relates to my hobby.
|
||||
|
||||
* _Education_
|
||||
- B.Tech, Information Technology, Maharaja Agrasen Institute of Technology *(2021 - Current)*
|
||||
- AISSCE (Grade 12), PCM, CBSE, *(2018-2020), 96%*
|
||||
- AISSE (Grade 10), CBSE, *(2016-2018), 90.2%*
|
||||
|
||||
* _Student Programs, Scholarships, Examinations_
|
||||
- *Google Summer of Code 2022*: I participated as a contributor in [[https://summerofcode.withgoogle.com/archive/2022][Google Summer of Code 2022]] at [[https://libvirt.org][libvirt]] and got paid a stipend for it by Google. The project involved adding the new introspectable statistics provided by QEMU and adding them under the libvirt statistics API.
|
||||
- *NOC: Foundations of Cryptography, IIIT Bangalore, NPTEL - May 2022*
|
||||
- *NOC: Computer Architecture, IIT Delhi, NPTEL - May 2022*
|
||||
|
||||
* _Skills_
|
||||
** Programming Languages
|
||||
- *Experienced*: C/C++, Rust, Python, Javascript, CSS, HTML
|
||||
- *Familiar*: Haskell, PHP, Java, Lua, x86-Assembly, ARM-Assembly
|
||||
|
||||
** Tools
|
||||
- *Experienced*: GNU/Linux, POSIX Shells, Git, Nix/NixOS, GNU Make, ffmpeg, OpenSSH, vi/vim, GNU Emacs, Docker, Hashicorp Nomad, Hashicorp Vault, nginx, Concourse CI
|
||||
- *Familiar*: TeX, Pandoc, GitHub Actions, ZFS, Oracle Cloud Infrastructure, Terraform, Hashicorp Consul, Portage, yarn/npm, Web Frameworks (Rocket, NodeJS, Svelte, ReactJS)
|
||||
|
||||
** Soft Skills (lists sorted by proficiency)
|
||||
- *Languages*: Hindi, Punjabi, English, Japanese (can read a little, cannot converse)
|
||||
- *Hobbies*: Home server/lab, Writing, Philosophy, Music theory, Geopolitics
|
13
flake.nix
13
flake.nix
|
@ -40,14 +40,23 @@
|
|||
};
|
||||
in
|
||||
rec {
|
||||
devShell = with pkgs.haskellPackages; shellFor {
|
||||
devShell = with pkgs; with haskellPackages; shellFor {
|
||||
packages = _: [ site ];
|
||||
withHoogle = true;
|
||||
buildInputs = [
|
||||
cabal-install
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-small
|
||||
fontspec
|
||||
enumitem
|
||||
parskip
|
||||
hyperref
|
||||
standalone
|
||||
titlesec;
|
||||
})
|
||||
haskell-language-server
|
||||
ghcid
|
||||
site
|
||||
];
|
||||
};
|
||||
packages = {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,8 +7,10 @@ cabal-version: >= 1.10
|
|||
executable site
|
||||
main-is: site.hs
|
||||
build-depends: base == 4.*
|
||||
, filepath == 1.4.*
|
||||
, hakyll == 4.15.*
|
||||
, pandoc == 2.*
|
||||
, process == 1.6.*
|
||||
, text == 1.*
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
default-language: Haskell2010
|
||||
|
|
66
src/site.hs
66
src/site.hs
|
@ -6,14 +6,26 @@ import Data.Maybe (isJust)
|
|||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Hakyll
|
||||
import Text.Pandoc (WriterOptions (writerHighlightStyle, writerNumberSections, writerTOCDepth, writerTableOfContents, writerTemplate))
|
||||
import System.FilePath (replaceDirectory, replaceExtension, takeDirectory)
|
||||
import qualified System.Process as Process
|
||||
import Text.Pandoc
|
||||
( WriterOptions
|
||||
( writerHighlightStyle,
|
||||
writerNumberSections,
|
||||
writerTOCDepth,
|
||||
writerTableOfContents,
|
||||
writerTemplate
|
||||
),
|
||||
)
|
||||
import qualified Text.Pandoc as Pandoc
|
||||
import Text.Pandoc.Templates (Template, compileTemplate)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
main :: IO ()
|
||||
main = hakyllWith config $ do
|
||||
let individualPatterns = fromList ["about.org", "contact.org", "links.org"]
|
||||
let individualPatterns = fromList ["about.org", "contact.org", "links.org", "documents/cv.org"]
|
||||
let copyPatterns = fromList ["images/**", "fonts/*", "documents/*"]
|
||||
|
||||
match "images/**" $ do
|
||||
route idRoute
|
||||
|
@ -27,6 +39,9 @@ main = hakyllWith config $ do
|
|||
route idRoute
|
||||
compile compressCssCompiler
|
||||
|
||||
match "*pdf" $ do
|
||||
route idRoute
|
||||
|
||||
match individualPatterns $ do
|
||||
route $ setExtension "html"
|
||||
compile $
|
||||
|
@ -34,6 +49,18 @@ main = hakyllWith config $ do
|
|||
>>= loadAndApplyTemplate "templates/default.html" defaultCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
-- kindly stolen from https://github.com/jaspervdj/jaspervdj/blob/b2a9a34cd2195c6e216b922e152c42266dded99d/src/Main.hs#L163-L169
|
||||
-- also see helper functions writeXetex and xelatex
|
||||
match "documents/cv.org" $
|
||||
version "pdf" $ do
|
||||
route $ setExtension "pdf"
|
||||
compile $
|
||||
getResourceBody
|
||||
>>= readPandoc
|
||||
>>= writeXeTex
|
||||
>>= loadAndApplyTemplate "templates/cv.tex" defaultCtx
|
||||
>>= xelatex
|
||||
|
||||
tags <- buildTags "posts/*" (fromCapture "archive/tags/*.html")
|
||||
|
||||
tagsRules tags $ \tag pattern -> do
|
||||
|
@ -139,6 +166,39 @@ main = hakyllWith config $ do
|
|||
>>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx
|
||||
|
||||
match "templates/*" $ compile templateBodyCompiler
|
||||
where
|
||||
-- https://github.com/jaspervdj/jaspervdj/blob/b2a9a34cd2195c6e216b922e152c42266dded99d/src/Main.hs#L214-L218
|
||||
writeXeTex :: Item Pandoc.Pandoc -> Compiler (Item String)
|
||||
writeXeTex = traverse $ \pandoc ->
|
||||
case Pandoc.runPure (Pandoc.writeLaTeX Pandoc.def pandoc) of
|
||||
Left err -> fail $ show err
|
||||
Right x -> return (T.unpack x)
|
||||
|
||||
-- https://github.com/jaspervdj/jaspervdj/blob/b2a9a34cd2195c6e216b922e152c42266dded99d/src/Main.hs#L280-L292
|
||||
-- but even more hacky
|
||||
xelatex :: Item String -> Compiler (Item TmpFile)
|
||||
xelatex item = do
|
||||
TmpFile texPath <- newTmpFile "xelatex.tex"
|
||||
let tmpDir = takeDirectory texPath
|
||||
pdfPath = replaceExtension texPath "pdf"
|
||||
|
||||
unsafeCompiler $ do
|
||||
writeFile texPath $ itemBody item
|
||||
let x = itemBody item
|
||||
_ <-
|
||||
Process.system $
|
||||
unwords
|
||||
[ "xelatex",
|
||||
"-halt-on-error",
|
||||
"-output-directory",
|
||||
tmpDir,
|
||||
texPath,
|
||||
">/dev/null",
|
||||
"2>&1"
|
||||
]
|
||||
return ()
|
||||
|
||||
makeItem $ TmpFile pdfPath
|
||||
|
||||
rssFeedConfiguration :: FeedConfiguration
|
||||
rssFeedConfiguration =
|
||||
|
@ -189,7 +249,7 @@ defaultCtx =
|
|||
domainCtx :: Context String
|
||||
domainCtx = constField "domain" domain
|
||||
subdomains :: [Item String]
|
||||
subdomains = map mkItem ["git", "nomad", "consul", "vault", "radio", "f", "ci"]
|
||||
subdomains = map mkItem ["git", "nomad", "consul", "vault", "radio", "f"]
|
||||
where
|
||||
mkItem :: a -> Item a
|
||||
mkItem a = Item {itemIdentifier = "subdomain", itemBody = a}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
\documentclass[a4paper, 11pt]{article}
|
||||
|
||||
\usepackage[margin=0.5in]{geometry}
|
||||
\usepackage[colorlinks=true]{hyperref}
|
||||
\usepackage{longtable}
|
||||
\usepackage{booktabs}
|
||||
|
||||
\usepackage{fontspec}
|
||||
\setmainfont[
|
||||
Path = fonts/,
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Regular,
|
||||
ItalicFont = *-Italic,
|
||||
BoldFont = *-Bold,
|
||||
BoldItalicFont = *-BoldItalic
|
||||
]{Arvo}
|
||||
|
||||
\setsansfont[
|
||||
Path = fonts/,
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Regular,
|
||||
ItalicFont = *-Italic,
|
||||
BoldFont = *-Bold,
|
||||
BoldItalicFont = *-BoldItalic
|
||||
]{Lato}
|
||||
|
||||
\usepackage{enumitem}
|
||||
\setlist[itemize]{leftmargin=*}
|
||||
\renewcommand{\labelitemi}{$$\sim$$}
|
||||
|
||||
\usepackage{parskip}
|
||||
\setlength{\parindent}{0em}
|
||||
\setlength{\parskip}{0.5em}
|
||||
\setcounter{secnumdepth}{-1}
|
||||
|
||||
\def\tightlist{}
|
||||
\usepackage{ulem}
|
||||
|
||||
\begin{document}
|
||||
$body$
|
||||
\end{document}
|
Loading…
Reference in New Issue