Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lucasgolino's full-sized avatar

Lucas Golino lucasgolino

  • São Paulo - SP
View GitHub Profile
@rmtuckerphx
rmtuckerphx / direnv-win.md
Last active January 12, 2024 18:32
Steps to install direnv on Windows

direnv on Windows

Overview

In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env file for local development. But dotenv requires you to add code to your project. With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.

Steps to install

For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.

  1. Create a folder such as c:\tools to put the direnv.exe file and add it to the Windows PATH
@bortels
bortels / Base64.lua
Created December 6, 2011 05:56
Base64 encode/decode for Codea (Lua)
-- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss <alexthkloss@web.de>
-- licensed under the terms of the LGPL2
-- character table string
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-- encoding
function enc(data)
return ((data:gsub('.', function(x)
local r,b='',x:byte()