Skip to content

Instantly share code, notes, and snippets.

View rljohnsn's full-sized avatar
🙂

Lance Johnson rljohnsn

🙂
View GitHub Profile
@abn
abn / heredoc-dockerfile.snip
Last active July 31, 2024 06:26
Dockerfile alternatives for heredoc
#printf
RUN printf '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
#echo
RUN echo -e '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
@rochacbruno
rochacbruno / mainpython.md
Last active July 22, 2024 19:03
Use of __main__.py

The use of __main__.py to create executables

myprojectfolder/
    |_ __main__.py
    |_ __init__.py

Being __main__.py:

print("Hello")

@colinvh
colinvh / aws.md
Last active August 11, 2025 15:57
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@afiune
afiune / delivery_publish_cookbook_multiple_chef_server.md
Last active July 19, 2017 20:58
Delivery Publish Cookbook to Multiple Chef Server/Organizations

Publish Cookbook to Multiple Chef Servers in Delivery

Our delivery-sugar cookbook exposes some libraries and a LWRP that we can use to publish a cookbook (or multiple) to multiple Chef Servers or Organizations.

Prerequisites

The only prerequisite we have before start coding is the generation of the knife.rb and the client_key on the build-nodes that we will use in the build-cookbook. This can be done manually by loging in to the build-nodes and laying down the file, or in an

@Lauszus
Lauszus / InputAutoCfg.ini
Last active February 17, 2021 23:38
RetroPie configurations for PS3 & PS4 controller
# /opt/retropie/configs/n64/InputAutoCfg.ini
# See: https://github.com/mupen64plus/mupen64plus-input-sdl/blob/master/data/InputAutoCfg.ini
[PLAYSTATION(R)3 Controller]
[Sony PLAYSTATION(R)3 Controller]
[SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
@lamont-granquist
lamont-granquist / resources.md
Last active August 17, 2023 22:29
Three Ways to Write Correct Chef Resources

This has been moved into the official Chef docs:

https://docs.chef.io/custom_resources_notes.html

12.5 style custom resources

This is by far the most recommended way of writing resources for all users. There are two gotchas which we're working through:

  1. For helper functions that you used to write in your provider code or used to mixin to your provider code, you have to use an action_class do ... end block.
@mechcozmo
mechcozmo / IAM Permissions List.md
Last active May 8, 2025 04:36
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)
@kzap
kzap / terraform-app.sh
Created June 28, 2016 15:54
Wrapper for terraform that lets you specify an environment and calls an $ENV.tfvars file, uses a $ENV.tfstate file and sets the env variable
#!/bin/bash
#
# terraform-app
#
# This to terraform the servers for the Galleon App
# By storing the date now, we can calculate the duration of provisioning at the
# end of this script.
start_seconds="$(date +%s)"