Skip to content

Instantly share code, notes, and snippets.

View dtuite's full-sized avatar
🚀
Shipping

David Tuite dtuite

🚀
Shipping
View GitHub Profile
@dtuite
dtuite / oops.log
Created September 14, 2020 20:58
Backstage log
» yarn start
yarn run v1.22.1
$ backstage-cli backend:dev
Build succeeded
[HMR] Updated modules:
[HMR] - ../../plugins/scaffolder-backend/src/service/router.ts
[HMR] - ../../plugins/scaffolder-backend/src/index.ts
[HMR] - ./src/plugins/scaffolder.ts
[HMR] - ./src/index.ts
[HMR] Update applied.
@dtuite
dtuite / example.scss
Created December 23, 2015 13:41
SCSS Loop for defining margin helpers.
$distances: ("s": 10px, "m": 25px);
$sides: left, top, bottom, right;
// This nested loop defines a set of spacer classes which we can use to place margins between
// elements.
//
// It generates slelectors which look like this:
//
// .ml--s {
// margin-left: 10px;
@dtuite
dtuite / Gemfile
Created September 23, 2015 11:01
Assigning PROs to polymorphic associations
# A sample Gemfile
source "https://rubygems.org"
gem "activerecord"
gem "sqlite3"
@dtuite
dtuite / 0.md
Last active September 14, 2015 21:30
Gzip assets when deploying with capistrano and Rails 4.2

Gzip assets when deploying with capistrano and Rails 4.2

@dtuite
dtuite / 0.md
Last active August 29, 2015 14:08
Interview Stuff
@dtuite
dtuite / 0.md
Last active August 29, 2015 14:02
Useful Ruby Vim Macros

.vimrc Tips and Tricks

@dtuite
dtuite / 0.md
Last active August 29, 2015 14:01
Upstart

Upstart

@dtuite
dtuite / docker-basic.md
Last active November 17, 2015 14:16
Basic Docker Commands

Docker Basics

There are two programs:

  1. The docker daemon - a server process which manages all the containers
  2. The docker client - a remote control for the daemon

You can list the commands of the docker client by typing docker with no arguments.

You can use container images which have been created by other people. You find them online in the docker index. You can search for images using docker search [keywords].

@dtuite
dtuite / 0.md
Last active August 29, 2015 14:00
SQL Date Formatting

SQL Date Formatting

@dtuite
dtuite / README.md
Created April 11, 2014 15:21 — forked from timcheadle/README.md
Environment aware robots.txt for Rails

Make /robots.txt aware of the Rails environment

You probably don't want Google crawling your development staging app. Here's how to fix that.

$ mv public/robots.txt config/robots.production.txt
$ cp config/robots.production.txt config/robots.development.txt

Now edit config/routes.rb to add a route for /robots.txt, and add the controller code.