Skip to content

Instantly share code, notes, and snippets.

View rmcafee's full-sized avatar

Rahsun McAfee rmcafee

View GitHub Profile
@artman41
artman41 / wsl-install_another_distro.md
Last active January 25, 2024 23:45
Instructions on how to install a custom distro in WSL2 (Windows SubSystem for Linux 2)

WSL install another distro

  1. Here are some default vars for the process
ISO_DIR=~/fedora;
ROOTFS_MOUNT_DIR=/mnt/contents

DISTRO_LOCATION=
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@pufe
pufe / README.md
Last active December 23, 2016 16:20 — forked from romul/README.md
Using Postres hstore with Elixir, Ecto & Postgrex

To use hstore in Ecto schemas you have to create own Ecto type. To do this, follow these steps:

  1. Create files hstore.ex & hstore_extension.ex inside your lib folder
  2. Open your database settings and add the following line

extensions: [{MyApp.HStoreExtension, nil}],, for example

config :my_app, MyApp.Repo,
 adapter: Ecto.Adapters.Postgres,
@mhuggins
mhuggins / multiparameter_attribute_assignment.rb
Last active September 5, 2020 19:41
MultiparameterAttributeAssignment
# app/models/concerns/multiparameter_attribute_assignment.rb
module MultiparameterAttributeAssignment
include ActiveModel::ForbiddenAttributesProtection
def initialize(params = {})
assign_attributes(params)
end
def assign_attributes(new_attributes)