Skip to content

Instantly share code, notes, and snippets.

View maikelthedev's full-sized avatar
🏠
Working from home

Miguel Frias Mosquea maikelthedev

🏠
Working from home
View GitHub Profile
@maikelthedev
maikelthedev / flake.nix
Created January 26, 2025 01:00
Oh my God I'm using Flakes now 🤯
{
description = "Basic flake for the dev environment of indie";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
@maikelthedev
maikelthedev / shell.nix
Created January 24, 2025 19:27
Now with extra colours and emojis 😮
# On Nixos running this from the project folder with nix-shell will create a shell with all the necessary dependencies
# and run postgresql in an ephemeral mode for development.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
elixir_1_18
elixir-ls
erlang
rebar3
@maikelthedev
maikelthedev / shell.nix
Created January 24, 2025 19:21
Now with cleaner variable interpolation
# On Nixos running this from the project folder with nix-shell will create a shell with all the necessary dependencies
# and run postgresql in an ephemeral mode for development.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
elixir_1_18
elixir-ls
erlang
rebar3
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "indie";
nativeBuildInputs = with pkgs; [
elixir_1_18
erlang
rebar3
nodejs
yarn
@maikelthedev
maikelthedev / Makefile
Last active September 29, 2024 10:43
Standard Makefile for a Phoenix project with --no-ecto and same version in FISH shell script
# Variables
MIX_ENV=prod
APP_NAME=experiment
BUILD_DIR=_build
SERVER_USER=ubuntu
SECRET_KEY_BASE=$(shell mix phx.gen.secret)
ENV_FILE=.env
RELEASE_DIR=$(BUILD_DIR)/$(MIX_ENV)/rel/$(APP_NAME)
PHX_HOST="maikeladas.es"
PORT=4001
@maikelthedev
maikelthedev / code.fish
Last active August 26, 2024 19:57
Fish shell function to remind you, you're on battery when typing "code" and offering you to load neovim instead of code to save battery
function code
# Determine the path to the code command
set path_is (command -v code)
# Check if the system is on battery
if is_on_battery
# Ask the user if they are sure they want to open VSCode
if ask_sure
# User confirmed; open VSCode with the provided argument
$path_is $argv

Stuff I am able to do

Rules:

  1. Only specifics

Tasks

  1. Build your cloud in AWS, Hetzner, Digital Ocean or Oracle C cloud Infrastructure automatedly as Infrastructure as code using Terraform.
* Stuff I am able to do
* Rules:
~ Only specifics
* Tasks
~ Build your cloud in AWS, Hetzner, Digital Ocean or Oracle Cloud Infrastructure
---@type ChadrcConfig
local M = {}
M.ui = { theme = 'ayu_dark' }
M.plugins = "custom.plugins"
--- Additional Key Mapping
local map = vim.keymap.set
@maikelthedev
maikelthedev / menu.fish
Created January 22, 2024 18:58
Dotfiles
#!/usr/bin/fish
set options_array "browser" "v-ter" "h-ter" "netflix" "whatsapp" "ssh" "layouts" "kill"
set options (string join "\n" $options_array)
set run (echo -e $options | rofi -p "menu" -dmenu -l 8 -width 15 -monitor -3)
function ssh_menu
set servers (cat .ssh/config | grep "Host " | cut -d" " -f2 | grep -v git | grep -v bitbucket)