Skip to content

Instantly share code, notes, and snippets.

@davidboothe
davidboothe / config _ rabbitmq.js
Created February 1, 2016 19:03 — forked from cbankston/config _ rabbitmq.js
node/rabbit example
module.exports = function(rabbit, subscribeTo) {
return rabbit.configure({
connection: {
user: 'guest',
pass: 'guest',
server: [
process.env.RABBITMQ_HOSTNAME
],
port: 5672,
vhost: '%2f',
@davidboothe
davidboothe / checkbox.css
Last active April 18, 2016 14:52
Font Awesome circle check checkboxes
@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
/*** basic styles ***/
body { margin: 30px; }
h1 { font-size: 1.5em; }
label { font-size: 24px; }
div {
width: 175px;
margin-left: 20px;
@davidboothe
davidboothe / commands.sh
Last active February 1, 2017 02:48
Notes and commands from Deploying Rails with Docker, Kubernetes and ECS
# Start a new rails api project in your current directory
$ docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app \
rails rails new --skip-bundle --api --database postgresql
$ cd webapp
$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app ruby:2.4 bundle install
@davidboothe
davidboothe / blender_hotkeys.md
Last active July 22, 2017 14:12
Blender Notes

General Controls

Rotate - MMB

Pan - Shift + MMB

Zoom - Mouse Scroll Wheel


@davidboothe
davidboothe / Dockerfile
Created November 16, 2018 14:45
Zsh Staging Dockerfile
# Staging Container
FROM node:8.12.0
# Set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# Add any global dependencies you need
# RUN npm install -g @angular/cli
@davidboothe
davidboothe / Enum Entities.cs
Created June 28, 2022 18:34
Helpful C# Code Snippets
public static PropertyBuilder<TEnum> HasEnumConversion<TEnum>(this PropertyBuilder<TEnum> propertyBuilder)
where TEnum : struct, Enum
{
return propertyBuilder.HasConversion(
enumValue => $"{enumValue}",
enumString => Enum.Parse<TEnum>(enumString)
);
}
version: '3.1'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_DATABASE: database_name
MONGO_INITDB_ROOT_USERNAME: user
@davidboothe
davidboothe / drag-drop.service.ts
Created July 19, 2022 12:35
Service used to handle drag and drop across multiple components
import {Inject, Injectable} from '@angular/core';
import {CdkDragDrop, CdkDragMove, CdkDragRelease, CdkDropList} from "@angular/cdk/drag-drop";
import {DOCUMENT} from "@angular/common";
@Injectable({
providedIn: 'root'
})
export class DragDropService {
public readonly DEFAULT_SCOPE = 'default';
@davidboothe
davidboothe / Darkula-POSH.icls
Created September 16, 2022 12:48
A Jetbrains terminal theme that works with the colors for oh-my-posh
<scheme name="Darcula" version="142" parent_scheme="Darcula">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2022-09-16T07:34:38</property>
<property name="ide">WebStorm</property>
<property name="ideVersion">2022.2.2.0.0</property>
<property name="modified">2022-09-16T07:34:54</property>
<property name="originalScheme">_@user_Darcula</property>
</metaInfo>
<option name="LINE_SPACING" value="1.2" />