Compare commits

...

10 Commits

Author SHA1 Message Date
Sanchayan Maity 73e2800295
Add link to keyoxide profile 2022-12-17 11:37:38 +05:30
Sanchayan Maity f195dd0cad
Update about me 2022-12-17 08:56:59 +05:30
Sanchayan Maity 77317d3369 Update Mastodon link 2022-11-23 09:56:35 +05:30
Sanchayan Maity 4fb75c9009 Fix Mastodon profile verification
Fixes commit f3655c2.
2022-11-20 10:26:27 +05:30
Sanchayan Maity 8f2e20b3d3 cabal.project: Add a cabal project file to pin compiler used
This allows us to specify something else in .cabal/config.
2022-11-19 14:51:53 +05:30
Sanchayan Maity 61f35bbb3a site.hs: Format with default LSP formatter 2022-11-19 14:33:51 +05:30
Sanchayan Maity 2490265685 Minor clean up for build depends 2022-11-19 14:17:49 +05:30
Sanchayan Maity 710955ed42 site.hs: Clean up redundant bracket 2022-11-19 14:16:44 +05:30
Sanchayan Maity 990c576703 Drop stack
We use cabal now.
2022-11-19 14:09:36 +05:30
Sanchayan Maity d643e7df12 Drop google analytics
Don't be evil :).
2022-11-19 13:08:31 +05:30
6 changed files with 154 additions and 170 deletions

View File

@ -31,3 +31,64 @@ man as a heroic being, with his own happiness as the moral purpose of his life,
with productive achievement as his noblest activity, and reason as his only
absolute.”
—Ayn Rand.</p>
# Open source contributions
- [GStreamer](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [gst-plugins-rs](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [Linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=author&q=Sanchayan+Maity)
- [u-boot](https://source.denx.de/u-boot/u-boot/-/commits/master?search=Sanchayan%20Maity)
- [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [PulseAudio](https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
# Talks
- [Free Monads](https://www.youtube.com/watch?v=fhu1UQel5eo)
- [Lens](https://www.youtube.com/watch?v=0sAvCCAz8DQ)
- [What's next for Bluetooth in PulseAudio?](https://www.youtube.com/watch?v=aU8Hjt2h6GQ)
- [Using Rust and GStreamer for building multimedia pipelines](https://hasgeek.com/rustlang/rustlang-mini-conference/schedule/using-rust-for-building-multimedia-pipelines-using-gstreamer-UfW59v9esDeZut5mXUVXhy)
# Blog
- [sanchayanmaity.net](https://sanchayanmaity.net)
- [sanchayanmaity.com](https://sanchayanmaity.com)
# Tools
- **desktop**: sway
- **CLI**: neovim, tmux, foot, fzf, rg
- **shell**: fish
- **browser**: qutebrowser
- ❤️ **Languages**: C, Rust, Haskell
- 💔 **Languages**: Python, JavaScript, Typescript
# dotfiles
- [https://git.sr.ht/~sanchayanmaity/dotfiles](https://git.sr.ht/~sanchayanmaity/dotfiles)
- [https://codeberg.org/sanchayanmaity/dotfiles](https://codeberg.org/sanchayanmaity/dotfiles)
# Give up GitHub
- [SourceHut](https://git.sr.ht/~sanchayanmaity)
- [CodeBerg](https://codeberg.org/sanchayanmaity)
- [GitLab](https://gitlab.freedesktop.org/SanchayanMaity)
## Keys
Public key used for signing:
```bash
41B3 422B 0370 3BF5 FD03 FAFB 6F6A 0609 C120 38F3
```
Also available as DNS TXT record.
```bash
dig TXT openpgp.sanchayanmaity.net +short | sed 's/"//g'
```
Also available via Web Key Directory at https://keys.openpgp.org/.
```bash
gpg --locate-keys --auto-key-locate clear,nodefault,wkd sanchayanmaity.net
```

2
cabal.project Normal file
View File

@ -0,0 +1,2 @@
packages: .
with-compiler: ghc-8.10

View File

@ -5,7 +5,7 @@ cabal-version: >= 1.10
executable site
main-is: site.hs
build-depends: base == 4.*
build-depends: base >= 4.12
, hakyll == 4.15.*
ghc-options: -threaded
default-language: Haskell2010

170
site.hs
View File

@ -1,116 +1,122 @@
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
import Data.Monoid (mappend)
import qualified GHC.IO.Encoding as E
import Hakyll
--------------------------------------------------------------------------------
main :: IO ()
main = do
E.setLocaleEncoding E.utf8
hakyllWith config $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
E.setLocaleEncoding E.utf8
hakyllWith config $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler
match "css/*" $ compile compressCssCompiler
create ["style.css"] $ do
route idRoute
compile $ do
csses <- loadAll "css/*.css"
makeItem $ unlines $ map itemBody csses
match "css/*" $ compile compressCssCompiler
create ["style.css"] $ do
route idRoute
compile $ do
csses <- loadAll "css/*.css"
makeItem $ unlines $ map itemBody csses
match (fromList ["about.markdown"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
match (fromList ["about.markdown"]) $ do
route $ setExtension "html"
compile $
pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
tags <- buildTags "posts/*" (fromCapture "tags/*.html")
match "posts/*" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls
match "posts/*" $ do
route $ setExtension "html"
compile $
pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls
create ["archive.html"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
listField "posts" (postCtxWithTags tags) (return posts) `mappend`
constField "title" "Archives" `mappend`
defaultContext
create ["archive.html"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
listField "posts" (postCtxWithTags tags) (return posts)
`mappend` constField "title" "Archives"
`mappend` defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls
match "index.html" $ do
route idRoute
compile $ do
posts <- fmap (take 3) . recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" (postCtxWithTags tags) (return posts) `mappend`
field "tags" (\_ -> renderTagList tags) `mappend`
constField "title" "Welcome" `mappend`
defaultContext
match "index.html" $ do
route idRoute
compile $ do
posts <- fmap (take 3) . recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" (postCtxWithTags tags) (return posts)
`mappend` field "tags" (\_ -> renderTagList tags)
`mappend` constField "title" "Welcome"
`mappend` defaultContext
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls
create ["sitemap.xml"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let sitemapCtx =
constField "baseUrl" "sanchayanmaity.net" `mappend`
constField "title" "Sitemap" `mappend`
listField "posts" (postCtxWithTags tags) (return posts) `mappend`
(postCtxWithTags tags)
create ["sitemap.xml"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let sitemapCtx =
constField "baseUrl" "sanchayanmaity.net"
`mappend` constField "title" "Sitemap"
`mappend` listField "posts" (postCtxWithTags tags) (return posts)
`mappend` postCtxWithTags tags
makeItem ""
>>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx
>>= cleanIndexHtmls
makeItem ""
>>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx
>>= cleanIndexHtmls
match "templates/*" $ compile templateBodyCompiler
match "templates/*" $ compile templateBodyCompiler
tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
compile $ do
posts <- recentFirst =<< loadAll pattern
let ctx = constField "title" title
`mappend` listField "posts" (postCtxWithTags tags) (return posts)
`mappend` defaultContext
tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
compile $ do
posts <- recentFirst =<< loadAll pattern
let ctx =
constField "title" title
`mappend` listField "posts" (postCtxWithTags tags) (return posts)
`mappend` defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/tag.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
makeItem ""
>>= loadAndApplyTemplate "templates/tag.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls
--------------------------------------------------------------------------------
config :: Configuration
config = defaultConfiguration {
destinationDirectory = "public"
}
config =
defaultConfiguration
{ destinationDirectory = "public"
}
postCtx :: Context String
postCtx =
dateField "date" "%B %e, %Y" `mappend`
defaultContext
dateField "date" "%B %e, %Y"
`mappend` defaultContext
postCtxWithTags :: Tags -> Context String
postCtxWithTags tags = tagsField "tags" tags `mappend` postCtx
cleanIndexHtmls :: Item String -> Compiler (Item String)
cleanIndexHtmls = return . fmap (replaceAll pattern replacement)
where
pattern = "/index.html"
where
pattern = "/index.html"
replacement :: String -> String
replacement = const "/"

View File

@ -1,74 +0,0 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# http://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
# resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-17.5
# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# extra-dep: true
# subdirs:
# - auto-update
# - wai
#
# A package marked 'extra-dep: true' will only be built if demanded by a
# non-dependency (i.e. a user package), and its test suites and benchmarks
# will not be run. This is useful for tweaking upstream packages.
packages:
- '.'
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- ipynb-0.1.0.1
- lrucache-1.2.0.1
- pandoc-2.11.4
- citeproc-0.3.0.8
- skylighting-0.10.4
- skylighting-core-0.10.4
- texmath-0.12.1.1
- hakyll-4.15.1.0
# Override default flag values for local packages and extra-deps
flags: {}
# Extra package databases containing global packages
extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.3"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor

View File

@ -1,17 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-60143780-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -19,7 +8,6 @@
<title>Coherent Musings - $title$</title>
<link rel="stylesheet" type="text/css" href="/style.css" />
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.5.0/css/all.css' />
<link rel="me" href="https://linuxrocks.online/@sanchayan"/>
</head>
<body>
<header>
@ -41,9 +29,10 @@
<ul>
<li><a class='fab fa-github' href='https://github.com/sanchayanmaity'></a></li>
<li><a class='fab fa-gitlab' href='https://gitlab.freedesktop.org/SanchayanMaity'></a></li>
<li><a class='fab fa-mastodon' href='https://linuxrocks.online/@sanchayan'></a></li>
<li><a rel="me" class='fab fa-mastodon' href='https://functional.cafe/@sanchayan'></a></li>
<li><a class='fab fa-lastfm-square' href='https://www.last.fm/user/sanchayan_maity'></a></li>
<li><a class='fab fa-linkedin' href='https://in.linkedin.com/in/sanchayan-maity-57235953'></a></li>
<li><a class='fas fa-fingerprint' href='https://keyoxide.org/41B3422B03703BF5FD03FAFB6F6A0609C12038F3'></a></li>
</ul>
<div>
Site proudly generated by