Skip to content

Instantly share code, notes, and snippets.

;;; init.el --- My customisations of emacs -*- lexical-binding: t; mode: emacs-lisp; -*-
;;; Commentary:
;; This is the new version in 2025
;;; Code:
;; Initialize package sources
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Initialize package sources
(require 'package)
;; Add Melpa and Melpa-Stable to the list of repositories
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; Initialize the package system
(package-initialize)
@joseche
joseche / atenas.md
Last active September 5, 2025 23:26
Alquiler Atenas

Proyecto Atenas

Alquiler amueblado

Idea general

Reparar y Alquilar

	- Carol puede financiar 
  • Javier puede evaluar y estimar
@joseche
joseche / Plan.md
Last active April 1, 2025 18:56
Plan Liz y Alan NL 2025

Plan de una semana en los Países Bajos

Día 1 - 20 Abril: Llegada a Ámsterdam

  • Actividades:
    • Llegada al aeropuerto de Schiphol en Ámsterdam.
    • Explorar el centro de la ciudad: paseo en barco por los canales (€16 por adulto, €8 para niños).
    • Visitar el Museo NEMO de Ciencias (€17.50 por adulto, gratis para menores de 4 años).
    • Pasear por la Plaza Dam y el distrito de Jordaan.
  • Cena: Disfrutar de panqueques holandeses en una panadería local (€15-20 por persona).
  • Alojamiento: viajar a Zwolle/Giethoorn en la tarde
git show-ref --tags --dereference | \
awk '/^.* refs\/tags/ { print $2 }' | \
while read -r ref; do
git show --no-patch --format="%d, %cd" --date=iso "$ref" | \
sed -ne 's/ (tag: \([^)]*\))/\1/p'
done
@joseche
joseche / go-run-shell.go
Created July 12, 2023 07:19
go-run-shell.go
package main
import (
"fmt"
"log"
"os"
"golang.org/x/crypto/ssh"
)
@joseche
joseche / playbook.yaml
Created May 16, 2023 20:44
ansible check disk and service
---
- name: Check disk space and service status
hosts: compute_nodes
gather_facts: true
tasks:
- name: Check disk space
ansible.builtin.shell: |
df -h|awk '{if(int($5)>10){print $1, $5; exit 1}}'
changed_when: false
package main
// https://ebitengine.org/en/examples/life.html
import (
"fmt"
"math/rand"
"strconv"
"time"
@joseche
joseche / iterators.tf
Created July 11, 2022 18:29
Terraform - Iterators
#
# Simple lists
#
locals {
ip_addresses = ["10.0.0.1", "10.0.0.2"]
}
resource "example" "example" {
for_each = toset(local.ip_addresses)
ip_address = each.key
@joseche
joseche / idle.sh
Created July 11, 2022 05:33
Shell to run something when CPU IDLE > 99
#!/usr/bin/env bash
# check systems idle time, run commands depending on that
function get_idle {
idle=$(top -bn2 | grep "Cpu(s)"|tail -n 1|sed "s/.*, *\([0-9.]*\)%* id.*/\1/")
echo "$idle"
}
function main_loop {