Skip to content

Instantly share code, notes, and snippets.

View lmcneel's full-sized avatar
:octocat:

latisha.mcneel@gmail.com lmcneel

:octocat:
View GitHub Profile
@lmcneel
lmcneel / direnv-win.md
Created January 12, 2024 18:32 — forked from rmtuckerphx/direnv-win.md
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
@lmcneel
lmcneel / Application.cfc
Created March 4, 2016 17:51 — forked from christierney402/Application.cfc
CF: Using "Access-Control-Allow-Origin" header in ColdFusion CFScript #snippet
component {
boolean function onRequestStart( required string targetPage ) {
var headers = getHttpRequestData().headers;
var origin = '';
var PC = getpagecontext().getresponse();
// Find the Origin of the request
if( structKeyExists( headers, 'Origin' ) ) {