1
0
Fork 0

Added blog posts, updated CV

This commit is contained in:
Kaan Genç 2020-10-01 00:37:29 -04:00
parent 4084d6504b
commit f9713a8844
9 changed files with 151 additions and 33 deletions

View file

@ -13,16 +13,23 @@
'[site.core]) '[site.core])
(deftask build [] (deftask build []
(comp (perun/pandoc) (comp (perun/draft)
(perun/highlight) (perun/pandoc :cmd-opts ["-f" "markdown" "-t" "html5"])
(sift :to-resource #{#"^img/(.*)"}) (sift :to-resource #{#"^img/(.*)"})
(sift :move {#"^img/(.*)" "public/img/$1"})
(sift :to-resource #{#"^extra/(.*)"}) (sift :to-resource #{#"^extra/(.*)"})
(sift :move {#"^extra/(.*)" "public/extra/$1"})
(garden :styles-var 'site.styles/base :output-to "main.css") (garden :styles-var 'site.styles/base :output-to "main.css")
(perun/ttr) ;; Time to read
(perun/word-count)
(perun/render :renderer 'site.core/page) (perun/render :renderer 'site.core/page)
(perun/permalink :filterer (fn [p] (not= (:slug p) "index")))
(perun/collection :renderer 'site.core/page-blog
:filterer (fn [p] (:title p)) ; don't list anything without a title
:sortby :date
:page "blog/index.html" :out-dir "")
(perun/sitemap :filename "sitemap.xml") (perun/sitemap :filename "sitemap.xml")
(sift :move {#"^public/(.*)" "$1"}))) (sift :move {#"^public/(.*)" "$1"}))) ; perun/render ignores out-dir for some reason
(deftask dev [] (deftask dev []
(comp (watch) (comp (watch)

View file

@ -27,12 +27,12 @@ the date of the lesson. Sure, glancing at the date to the corner of my
screen and writing it down takes just a few seconds, but why not write screen and writing it down takes just a few seconds, but why not write
a command to do it for me? Here is what I came up with: a command to do it for me? Here is what I came up with:
```commonlisp ~~~commonlisp
(defun insert-current-date () (defun insert-current-date ()
"Insert the current date in YYYY-MM-DD format." "Insert the current date in YYYY-MM-DD format."
(interactive) (interactive)
(shell-command "date +'%Y-%m-%d'" t)) (shell-command "date +'%Y-%m-%d'" t))
``` ~~~
Now that was easy and convenient. And being able to write my first Now that was easy and convenient. And being able to write my first
piece of Elisp so easily was really fun, so I decided to tackle piece of Elisp so easily was really fun, so I decided to tackle

Binary file not shown.

Binary file not shown.

70
content/extra/emacs.css Normal file
View file

@ -0,0 +1,70 @@
/* pygments.org "emacs" style */
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #008800; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #008800 } /* Comment.Preproc */
.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */
.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #AA22FF } /* Keyword.Pseudo */
.highlight .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BB4444 } /* Literal.String */
.highlight .na { color: #BB4444 } /* Name.Attribute */
.highlight .nb { color: #AA22FF } /* Name.Builtin */
.highlight .nc { color: #0000FF } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #00A000 } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #B8860B } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BB4444 } /* Literal.String.Affix */
.highlight .sb { color: #BB4444 } /* Literal.String.Backtick */
.highlight .sc { color: #BB4444 } /* Literal.String.Char */
.highlight .dl { color: #BB4444 } /* Literal.String.Delimiter */
.highlight .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BB4444 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BB4444 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BB4444 } /* Literal.String.Single */
.highlight .ss { color: #B8860B } /* Literal.String.Symbol */
.highlight .bp { color: #AA22FF } /* Name.Builtin.Pseudo */
.highlight .fm { color: #00A000 } /* Name.Function.Magic */
.highlight .vc { color: #B8860B } /* Name.Variable.Class */
.highlight .vg { color: #B8860B } /* Name.Variable.Global */
.highlight .vi { color: #B8860B } /* Name.Variable.Instance */
.highlight .vm { color: #B8860B } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

View file

@ -16,7 +16,7 @@ performance and scalability impacts.
<div class="authors">Kaan Genç, Michael D. Bond, and Guoqing Harry Xu</div> <div class="authors">Kaan Genç, Michael D. Bond, and Guoqing Harry Xu</div>
<div class="conf">ACM SIGPLAN Conference on Programming Language Design and Implementation <a href="https://pldi20.sigplan.org/home">(PLDI 2020)</a>, Online, June 2020</div> <div class="conf">ACM SIGPLAN Conference on Programming Language Design and Implementation <a href="https://pldi20.sigplan.org/home">(PLDI 2020)</a>, Online, June 2020</div>
[Talk](https://www.youtube.com/watch?v=wdVLlQXV1to) [Paper](https://dl.acm.org/doi/10.1145/3385412.3385991) [Extended Paper](https://arxiv.org/pdf/2004.00262.pdf) [Implementation](https://github.com/PLaSSticity/Crafty) [Talk](https://www.youtube.com/watch?v=wdVLlQXV1to) [Paper](https://dl.acm.org/doi/10.1145/3385412.3385991) [Extended Paper](https://arxiv.org/pdf/2004.00262.pdf) [Implementation](https://github.com/PLaSSticity/Crafty) [Poster](/extra/Crafty Poster.pdf)
</div> </div>
@ -25,7 +25,7 @@ performance and scalability impacts.
<div class="authors">Kaan Genç, Jake Roemer, Yufan Xu, and Michael D. Bond</div> <div class="authors">Kaan Genç, Jake Roemer, Yufan Xu, and Michael D. Bond</div>
<div class="conf">ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications <a href="https://2019.splashcon.org/track/splash-2019-oopsla">(OOPSLA 2019)</a>, Athens, Greece, October 2019</div> <div class="conf">ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications <a href="https://2019.splashcon.org/track/splash-2019-oopsla">(OOPSLA 2019)</a>, Athens, Greece, October 2019</div>
[Talk](https://www.youtube.com/watch?v=YgZWnc31tVQ) [Paper](https://dl.acm.org/doi/10.1145/3360605) [Extended Paper](https://arxiv.org/pdf/1904.13088.pdf) [Implementation](https://github.com/PLaSSticity/SDP-WDP-implementation) [Talk](https://www.youtube.com/watch?v=YgZWnc31tVQ) [Paper](https://dl.acm.org/doi/10.1145/3360605) [Extended Paper](https://arxiv.org/pdf/1904.13088.pdf) [Implementation](https://github.com/PLaSSticity/SDP-WDP-implementation) [Poster](/extra/DepAware Poster.pdf)
</div> </div>

View file

@ -9,10 +9,10 @@ For some time, I used LastPass to store my passwords. While LastPass works well,
Pass uses GPG keys to encrypt the passwords, and git to keep revisions and backups. It integrates well with the shell, and there is a dmenu script, a Firefox plugin and an Android app. All the passwords are just GPG enrypted files, stored in some folders anyway, so you don't need anything special to work with them. Pass uses GPG keys to encrypt the passwords, and git to keep revisions and backups. It integrates well with the shell, and there is a dmenu script, a Firefox plugin and an Android app. All the passwords are just GPG enrypted files, stored in some folders anyway, so you don't need anything special to work with them.
![passmenu, the dmenu pass script](/static/passmenu.png) ![passmenu, the dmenu pass script](/img/passmenu.png)
So first, I needed to migrate my passwords from LastPass to pass. The website lists some scripts for migration, but sadly I missed that when I first looked at the page. So I decided to write a [python script to handle the migration](https://gist.github.com/SeriousBug/e9f33873d10ad944cbe6) myself. It inserts all passwords in `domain/username` format, and if there is any extra data written, it is added after the password as well. Secure notes are placed into their own folder, and any "Generated Password for ..." entries are skipped. If you're migrating from LastPass to pass, feel free to give it a try. If you are taking an export from their website however, do make sure that there is no whitespace before and after the csv. So first, I needed to migrate my passwords from LastPass to pass. The website lists some scripts for migration, but sadly I missed that when I first looked at the page. So I decided to write a [python script to handle the migration](https://gist.github.com/SeriousBug/e9f33873d10ad944cbe6) myself. It inserts all passwords in `domain/username` format, and if there is any extra data written, it is added after the password as well. Secure notes are placed into their own folder, and any "Generated Password for ..." entries are skipped. If you're migrating from LastPass to pass, feel free to give it a try. If you are taking an export from their website however, do make sure that there is no whitespace before and after the csv.
![Password Store, the pass Android app](/static/password_store.png) ![Password Store, the pass Android app](/img/password_store.png)
I certainly recommend trying out pass. It works very well, and it fits in with the unix philosophy. I certainly recommend trying out pass. It works very well, and it fits in with the unix philosophy.

View file

@ -5,16 +5,19 @@
(defn format-time [time] (.format (-> time .toInstant (.atZone (java.time.ZoneId/systemDefault)) .toLocalDate) (java.time.format.DateTimeFormatter/ofPattern "MMM d, yyyy"))) (defn format-time [time] (.format (-> time .toInstant (.atZone (java.time.ZoneId/systemDefault)) .toLocalDate) (java.time.format.DateTimeFormatter/ofPattern "MMM d, yyyy")))
(defn page [{global-meta :meta posts :entries post :entry}] (defn page-header [& [title]]
(hp/html5
[:head [:head
[:meta {:charset "utf-8"}] [:meta {:charset "utf-8"}]
[:link {:rel "stylesheet" :href "main.css"}]] [:link {:rel "stylesheet" :href "/main.css"}]
[:title "Homepage of Kaan Genç"] [:link {:rel "stylesheet" :href "/extra/emacs.css"}]
[:title (when title (str title " - ")) "Homepage of Kaan Genç"]
[:link {:href [:link {:href
"https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap" "https://fonts.googleapis.com/css2?family=Ubuntu+Mono&family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap"
:rel "stylesheet"}] :rel "stylesheet"}]])
(defn page-left-column [& [slug]]
[:div.sidebar.column [:div.sidebar.column
(when (not= slug "index") [:a.home {:href "/"} "Home"])
[:img.picture {:alt "A photo of Kaan Genç, after his OOPSLA 2019 talk." :src "/img/profile.jpg"}] [:img.picture {:alt "A photo of Kaan Genç, after his OOPSLA 2019 talk." :src "/img/profile.jpg"}]
[:div.name "Kaan Genç"] [:div.name "Kaan Genç"]
[:div.title "PhD Student"] [:div.title "PhD Student"]
@ -24,7 +27,15 @@
[:a.github {:href "https://github.com/SeriousBug"} "Github"] [:a.github {:href "https://github.com/SeriousBug"} "Github"]
[:a.github {:href "https://twitter.com/KaanGencCS"} "Twitter"] [:a.github {:href "https://twitter.com/KaanGencCS"} "Twitter"]
[:a.researchr {:href "https://conf.researchr.org/profile/kaangenc"} "Researchr"] [:a.researchr {:href "https://conf.researchr.org/profile/kaangenc"} "Researchr"]
[:a.cv {:href "/extra/cv.pdf"} "CV"]] [:a.cv {:href "/extra/cv.pdf"} "CV"]
[:a.blog {:href "/blog/"} "Blog"]])
(defn page [{global-meta :meta posts :entries post :entry}]
(hp/html5
(page-header (:title post))
(page-left-column (:slug post))
(if (= "index" (:slug post)) (if (= "index" (:slug post))
;; Index page ;; Index page
[:div.main.column (:content post)] [:div.main.column (:content post)]
@ -33,4 +44,15 @@
[:h1.post-title (:title post)] [:h1.post-title (:title post)]
[:div.date "Written at " (-> post :date format-time)] [:div.date "Written at " (-> post :date format-time)]
(when (:modified post) [:div.modified "Last edited at " (-> post :modified format-time)]) (when (:modified post) [:div.modified "Last edited at " (-> post :modified format-time)])
[:div.ttr (:word-count post) " words, takes about " (:ttr post) " minutes to read"]
(:content post)]))) (:content post)])))
(defn page-blog [{global-meta :meta posts :entries post :entry}]
(hp/html5
(page-header "Blog")
(page-left-column)
(into [:div.main.column [:h1 "My thoughts on software & computer science"]]
(map (fn [{:keys [title permalink ttr date] :as post}]
[:a.post-listing {:href permalink} [:span.title title] [:br] [:span.ttr ttr " minute read, "] [:span.date (format-time date)]])
posts))))

View file

@ -5,8 +5,17 @@
(def textcolor-main "rgba(0, 0, 0, 0.87)") (def textcolor-main "rgba(0, 0, 0, 0.87)")
(defstyles base (defstyles base
; normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
; Adapted to Garden and trimmed
[:html {"-webkit-text-size-adjust" "100%"}]
[:body {:margin "0"}]
[:main {:display "block"}]
[:a {:background-color "transparent"}]
[:img {:border-style "none"}]
; Website styles
[:.main [:.main
{:max-width "600px"}] {:max-width "600px"
:line-height "1.4"}]
[:h1 {:font-size "1.5em"}] [:h1 {:font-size "1.5em"}]
["h1:not(:first-child)" {:margin-top "2em"}] ["h1:not(:first-child)" {:margin-top "2em"}]
[:h2 {:font-size "1.3em"}] [:h2 {:font-size "1.3em"}]
@ -14,8 +23,9 @@
["img, .img" {:border-radius "5px" :max-width "100%"}] ["img, .img" {:border-radius "5px" :max-width "100%"}]
[:.sidebar [:.sidebar
{:max-width "300px"} {:max-width "300px"}
[">a,span" {:display "block" :padding "10px 0"}]
[:.gpg {:font-size "0.8em" :margin-left "20px"}]] [:.gpg {:font-size "0.8em" :margin-left "20px"}]]
[".sidebar>a,.sidebar>span" {:display "block" :padding ".5em 0"}]
[:.post-listing {:margin ".5em 0" :display "block"} [:.ttr {:margin-left "20px"}]]
[:.column [:.column
{:flex "auto" {:flex "auto"
:padding "20px"}] :padding "20px"}]
@ -27,19 +37,28 @@
:justify-content "center" :justify-content "center"
:color textcolor-main :color textcolor-main
:background-color "#ffead1" :background-color "#ffead1"
:font-family "Ubuntu, sans-serif" :font-family "'Ubuntu', sans-serif"
:font-size "16px" :font-size "16px"
:line-height 1.2}] :line-height 1.2}]
[:a {:text-decoration "none" :color "#ae3100"}] [:a {:text-decoration "none" :color "#ae3100"}]
["a:link"] ["a:link"]
["a:visited" {:color "#681e00"}] ["a:visited" {:color "#932900"}]
["a:hover"] ["a:hover"]
["a:active"] ["a:active"]
[".date, .modified, .ttr" {:color "rgba(0, 0, 0, 0.67)" :text-align "right"}]
[:.other-stuff [:.other-stuff
{:margin-top "4em"} {:margin-top "4em"}
[:img {:float "left" :max-width "250px" :margin-right "40px"}]] [:img {:float "left" :max-width "250px" :margin-right "40px"}]]
["code, pre" {:font-size "0.95em" :font-family "'Ubuntu Mono', monospace"}]
["pre, :not(pre) > code" {:background-color "rgba(0, 0, 0, 0.15)" :overflow-x "auto"
:border-radius "10px"
:padding "3px"
:margin "-3px 0"}]
[:a.home {:font-size "1.2em" :margin "0 20px"}]
[:.name {:padding "10px 0" :font-size "1.2em"}] [:.name {:padding "10px 0" :font-size "1.2em"}]
[:.publication [:p [:a {:padding "0 10px"}]]] [:.publication [:p [:a {:padding "0 10px"}]]]