Compare commits

...

5 Commits

Author SHA1 Message Date
J. Fernando Sánchez 339951a41a update todo 6 months ago
J. Fernando Sánchez 8e31ce6c2a remove cv 6 months ago
J. Fernando Sánchez e074f338b3 update todo 6 months ago
J. Fernando Sánchez 59b0452b4a define summary nix entry 6 months ago
J. Fernando Sánchez 0ed126564a add new entry about Nix 6 months ago

@ -0,0 +1,78 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- hugo
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.120.3
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

@ -0,0 +1,6 @@
---
date: '{{ .Date }}'
draft: true
title: '{{ replace .File.ContentBaseName `-` ` ` | title }}'
---

@ -20,7 +20,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
tag = "tags"
post = "posts"
[Author]
[params.author]
name = "J. Fernando Sánchez"
profile = "http://balkian.com"
@ -161,4 +161,4 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
startLevel = 1
[markup.goldmark.renderer]
unsafe= true
unsafe= true

@ -4,28 +4,32 @@ menu: main
---
### PhD
- [x] Write my first workshop paper as main author
- [x] Write my first journal paper
- [x] Write my first book chapter
- [x] Chair a W3C Community Group
- [x] Collaborate on a W3C recommendation
- [ ] Become a doctor!
### Technical
- [x] Write a NodeJS App. Maia [See [ISSUES](http://github.com/gsi-upm/maia/issues)]
- [x] Write my first Django Application
- [ ] Develop a distributed LibP2P golang application
- [ ] Github repo with +100 stars
- [ ] Develop a distributed rust application (e.g., libp2p)
- [ ] Maintain a Github repo +100 active users
- [ ] Build a custom LineageOS image
- [ ] ~~Develop a distributed LibP2P golang application~~
### Languages
- [x] English
- [ ] Chinese
- [ ] Greek
- [ ] German
- [ ] Esperanto
- [ ] ~~Chinese~~
- [ ] ~~Greek~~
- [ ] ~~German~~
- [ ] Italian
- [ ] Esperanto (?)
### Personal
- [x] Run a 10k
- [ ] Run a Marathon
- [ ] Join an online community (e.g., Rust meetup, discord server)
- [ ] Blog regularly for a year
### ~~PhD~~
- [x] Write my first workshop paper as main author
- [x] Write my first journal paper
- [x] Write my first book chapter
- [x] Chair a W3C Community Group
- [x] Collaborate on a W3C recommendation
- [x] Become a doctor!

@ -0,0 +1,62 @@
---
date: '2023-11-13T18:21:46+01:00'
title: 'Nix Recipe for Python Projects'
tags:
- nix
- python
---
This is a quick and easy recipe to add a `default.nix` to any Python project with a `requirements.txt` file:
<!--more-->
```nix
with import <nixpkgs> { };
let
pythonPackages = python311Packages;
in pkgs.mkShell rec {
name = "impurePythonEnv";
venvDir = "./.venv";
buildInputs = [
# A python interpreter including the 'venv' module is required to bootstrap
# the environment.
pythonPackages.python
# This execute some shell code to initialize a venv in $venvDir before
# dropping into the shell
pythonPackages.venvShellHook
# Those are dependencies that we would like to use from nixpkgs, which will
# add them to PYTHONPATH and thus make them accessible from within the venv.
pythonPackages.numpy
pythonPackages.requests
# In this particular example, in order to compile any binary extensions they may
# require, the python modules listed in the hypothetical requirements.txt need
# the following packages to be installed locally:
taglib
openssl
git
libxml2
libxslt
libzip
zlib
];
# Now we can execute any commands within the virtual environment.
# This is optional and can be left out to run pip manually.
postShellHook = ''
pip install -r requirements.txt
'';
}
```
Now, you will get a clean environment by running:
```
nix-shell
```

@ -34,9 +34,6 @@
<a href="{{ .URL}}"><li class='{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} active{{end}}' >{{ .Name }}
</li></a>
{{ end }}
<a href="//jfernando.es" target="_blank"><li>
CV
</li></a>
<a href="{{ "/search" | relURL }}"><li>
<i class="fa fa-search"></i>
</li></a>

Loading…
Cancel
Save