Snippets

Useful Rails Query

Ruby

Find users with more than 5 posts using ActiveRecord: `User.joins(:posts).group(:id).having("C...

View Snippet
Bootstrap with Rails 7

Bootstrap with Rails 7

View Snippet
AWX-operator_setup_on_K3s+https.md

Markdown

View Snippet
Convert Sticky Notes (outlook) .eml files to markdown files.md

Markdown

Convert Sticky Notes (outlook) .eml files to markdown files.md

View Snippet
Add middleware request logging for token testing to rails

Ruby

Add middleware request logging for token testing to rails

View Snippet
Design Doc Template

Markdown

Design Doc Template

View Snippet
A basic example of a custom Rails generator with the full guide and explanation available at https://garrettdimon.com/journal/posts/creating-custom-rails-geenrators

A basic example of a custom Rails generator with the full guide and explanation available at http...

View Snippet
MySQL Cheat Sheet

Markdown

MySQL Cheat Sheet

View Snippet
Rails console send email

Ruby

Rails console send email

View Snippet
Ruby / Rails :: devise routes.rb

Ruby

Ruby / Rails :: devise routes.rb

View Snippet
Humanize time (seconds)

Ruby

Humanize time (seconds)

View Snippet
RPI Setup for Broadcastify Feed

Markdown

RPI Setup for Broadcastify Feed

View Snippet
OSx Code Signing Pyinstaller executable

Markdown

OSx Code Signing Pyinstaller executable

View Snippet
Significant Knowledge Transfer Areas for SD

Markdown

Significant Knowledge Transfer Areas for SD

View Snippet
Windows Tweaks

Markdown

Windows Tweaks

View Snippet
Module Release Deployment

Markdown

Module Release Deployment

View Snippet
Script to generate table of contents for user's gists

Python

Script to generate table of contents for user's gists

View Snippet
Gist Table of Contents

Markdown

Gist Table of Contents

View Snippet
Grep Cheatsheet

Markdown

Grep Cheatsheet

View Snippet
Unicode Cheatsheet

Markdown

Unicode Cheatsheet

View Snippet
Sed Cheatsheet

Markdown

Sed Cheatsheet

View Snippet
Screen Cheatsheet

Markdown

Screen Cheatsheet

View Snippet
RSpec Cheatsheet

Markdown

RSpec Cheatsheet

View Snippet
MySQL Cheatsheet

Markdown

MySQL Cheatsheet

View Snippet
Markdown Cheatsheet

Markdown

Markdown Cheatsheet

View Snippet
Phusion Passenger : Restarting Apps

Shell

Phusion Passenger : Restarting Apps

View Snippet
Find Cheatsheet

Markdown

Find Cheatsheet

View Snippet
Curl Cheatsheet

Markdown

Curl Cheatsheet

View Snippet
Circle CI Cheatsheet

Markdown

Circle CI Cheatsheet

View Snippet
Bash Cheatsheet

Markdown

Bash Cheatsheet

View Snippet
Rails Model Cheatsheet

Markdown

Rails Model Cheatsheet

View Snippet
Load payor config

Ruby

Load payor config

View Snippet
Ruby arrays methods Cheatsheet

Markdown

Ruby arrays methods Cheatsheet

View Snippet
Python ANSI color class

Python

Python ANSI color class

View Snippet
Determine platform type

Python

Determine platform type

View Snippet
SnippetsLab json export to github gist

Python

SnippetsLab json export to github gist

View Snippet
shell :: prepend first line of one file to another

Shell

shell :: prepend first line of one file to another

View Snippet
shell :: split file by lines

Shell

shell :: split file by lines

View Snippet
Generate seed.rb from existing models and data

Ruby

Generate seed.rb from existing models and data

View Snippet
interesting

Shell

interesting

View Snippet
ANSI terminal color codes

Shell

ANSI terminal color codes

View Snippet
Default script header and

Python

Default script header and

View Snippet
wait do while waiting for jobs to end

Shell

wait do while waiting for jobs to end

View Snippet
Fix line endings in repo

Git Attributes

Fix line endings in repo

View Snippet
Grep for and kill multiple processes with

Shell

Grep for and kill multiple processes with

View Snippet
connect to bash in container

Shell

connect to bash in container

View Snippet
Override header options for specific navigation screen

JavaScript

Override header options for specific navigation screen

View Snippet
Javascript :: continue vs. break in loops

JavaScript

Javascript :: continue vs. break in loops

View Snippet
FeedMonster OSN (create/update) to push

Markdown

FeedMonster OSN (create/update) to push

View Snippet
install intell gem on m1

Shell

install intell gem on m1

View Snippet
Find with exec

Shell

Find with exec

View Snippet
ScrollView with Touchable Opacity and KeyboardAvoidingView for form -native

JavaScript

ScrollView with Touchable Opacity and KeyboardAvoidingView for form -native

View Snippet
use-hook-form example -native

JavaScript

use-hook-form example -native

View Snippet
RPI Desktop Auto Start

desktop

RPI Desktop Auto Start

View Snippet
Cron Cheatsheet

Markdown

Cron Cheatsheet

View Snippet
Hide errors and output

Shell

Hide errors and output

View Snippet
.leptonrc

JSON

.leptonrc

View Snippet
React :: Create new react app / project

Text

React :: Create new react app / project

View Snippet
React :: React Compenents

Text

React :: React Compenents

View Snippet
Javascript :: Object Methods

JavaScript

Javascript :: Object Methods

View Snippet
Javascript :: Objects II: Examples

JavaScript

Javascript :: Objects II: Examples

View Snippet
React :: CreateDataContext.js

JavaScript

React :: CreateDataContext.js

View Snippet
shell :: gitup.sh

Shell

shell :: gitup.sh

View Snippet
Javascript :: defining constants w/ default params

JavaScript

Javascript :: defining constants w/ default params

View Snippet
Ruby / Rails :: Simple Array

Ruby

Ruby / Rails :: Simple Array

View Snippet
Objective-C :: UITableView Methods

Objective-C

Objective-C :: UITableView Methods

View Snippet
Ruby :: Installing Ruby via Homebrew

Shell

Ruby :: Installing Ruby via Homebrew

View Snippet
React App Template :: usermgt.js

CSS

React App Template :: usermgt.js

View Snippet
Ruby / Rails :: routes.rb api namespace

Ruby / Rails :: routes.rb api namespace

View Snippet
Ruby / Rails :: Create new app (MySQL, No turbo-links)

Shell

Ruby / Rails :: Create new app (MySQL, No turbo-links)

View Snippet
React App Template :: Signup.js

JavaScript

React App Template :: Signup.js

View Snippet
Ruby / Rails :: form - check box

HTML+ERB

Ruby / Rails :: form - check box

View Snippet
Ruby / Rails :: form_tag

Ruby / Rails :: form_tag

View Snippet
Ruby / Rails :: scratch pad

Ruby / Rails :: scratch pad

View Snippet
Javascript :: Arrays I & Methods

JavaScript

Javascript :: Arrays I & Methods

View Snippet
Javascript :: else if

JavaScript

Javascript :: else if

View Snippet
React App Template :: NavStack.js

JavaScript

React App Template :: NavStack.js

View Snippet
Ruby / Rails :: rake db:migrate notes

Shell

Ruby / Rails :: rake db:migrate notes

View Snippet
Javascript :: .forEach

JavaScript

Javascript :: .forEach

View Snippet
React :: Info.plist for new app from template

Text

React :: Info.plist for new app from template

View Snippet
Javascript :: Objects

JavaScript

Javascript :: Objects

View Snippet
Javascript :: using switch

JavaScript

Javascript :: using switch

View Snippet
shell :: fixsite.rb

Ruby

shell :: fixsite.rb

View Snippet
Ruby / Rails :: install mySQL2 gem

Shell

Ruby / Rails :: install mySQL2 gem

View Snippet
Javascript :: using return

JavaScript

Javascript :: using return

View Snippet
Ruby / Rails :: Devise GEM version

Ruby

Ruby / Rails :: Devise GEM version

View Snippet
Ruby / Rails :: Nested Arrays

Ruby

Ruby / Rails :: Nested Arrays

View Snippet
Ruby / Rails :: devise mailer setttings

Ruby

Ruby / Rails :: devise mailer setttings

View Snippet
postgres :: import db

Text

postgres :: import db

View Snippet
React :: build new app from our template app

Text

React :: build new app from our template app

View Snippet
Reddit Automod :: Require Post Flair or Remove

Text

Reddit Automod :: Require Post Flair or Remove

View Snippet
Ruby / Rails :: app/views/layouts/_header.html.erb if signed in...show menu

Ruby

Ruby / Rails :: app/views/layouts/_header.html.erb if signed in...show menu

View Snippet
Ruby / Rails :: devise install

Shell

Ruby / Rails :: devise install

View Snippet
shell :: Updating/Upgradiing Ruby Version on Server

Shell

shell :: Updating/Upgradiing Ruby Version on Server

View Snippet
Javascript :: alternating character Caps example

JavaScript

Javascript :: alternating character Caps example

View Snippet
Ruby / Rails :: redirect_to back

Ruby

Ruby / Rails :: redirect_to back

View Snippet
Ruby / Rails :: route_formatter.rake

Ruby

Ruby / Rails :: route_formatter.rake

View Snippet
Javascript :: Object Spreads refactoring

JavaScript

Javascript :: Object Spreads refactoring

View Snippet
Javascript :: using backticks to write Javascript

JavaScript

Javascript :: using backticks to write Javascript

View Snippet
Javascript :: Arrays III : Spreading

JavaScript

Javascript :: Arrays III : Spreading

View Snippet
React App Template :: Login.js

JavaScript

React App Template :: Login.js

View Snippet
Javascript :: Functions within Functions

JavaScript

Javascript :: Functions within Functions

View Snippet
Ruby / Rails :: routes for api only

Ruby

Ruby / Rails :: routes for api only

View Snippet
Install mysql gem

Text

Install mysql gem

View Snippet
Javascript :: toString and parseFloat

JavaScript

Javascript :: toString and parseFloat

View Snippet
Mac :: flush dns cache

Shell

Mac :: flush dns cache

View Snippet
Javascript :: debugging

JavaScript

Javascript :: debugging

View Snippet
Javascript :: built in methods

JavaScript

Javascript :: built in methods

View Snippet
git :: gitup after clone (only have to clone once)

Text

git :: gitup after clone (only have to clone once)

View Snippet
Ruby / Rails :: Module Template

Ruby

Ruby / Rails :: Module Template

View Snippet
React App Template :: Button.js

JavaScript

React App Template :: Button.js

View Snippet
Objective-C :: UITableView Slide to Delete

Objective-C

Objective-C :: UITableView Slide to Delete

View Snippet
Javascript :: Recursion

JavaScript

Javascript :: Recursion

View Snippet
shell :: hailgo git update

Shell

shell :: hailgo git update

View Snippet
Objective-C :: UITableView Slide to Multi

Objective-C

Objective-C :: UITableView Slide to Multi

View Snippet
Reddit Automod :: Process Post

Text

Reddit Automod :: Process Post

View Snippet
shell :: ruby / rails install

Shell

shell :: ruby / rails install

View Snippet
React :: Fastlane (auto versioning for mobile)

JSON

React :: Fastlane (auto versioning for mobile)

View Snippet
React :: DataContext.js

JavaScript

React :: DataContext.js

View Snippet
Ruby / Rails :: form - radio buttons

HTML+ERB

Ruby / Rails :: form - radio buttons

View Snippet
Javascript :: Arrays II: NESTED ARRAYS

JavaScript

Javascript :: Arrays II: NESTED ARRAYS

View Snippet
postgres :: Reset unique keys for incremental column

Text

postgres :: Reset unique keys for incremental column

View Snippet
git :: Git - Basic Branching and Merging

Text

git :: Git - Basic Branching and Merging

View Snippet
Ruby / Rails :: Rails 7 new app with bootstrap

Shell

Ruby / Rails :: Rails 7 new app with bootstrap

View Snippet
Ruby / Rails :: enable activestorage

Ruby

Ruby / Rails :: enable activestorage

View Snippet
Javascript :: PBV v. PBR Functions

JavaScript

Javascript :: PBV v. PBR Functions

View Snippet
Javascript :: clearing console w/ javascript

JavaScript

Javascript :: clearing console w/ javascript

View Snippet
git :: Deleting Bad Branch and Resetting Master

Text

git :: Deleting Bad Branch and Resetting Master

View Snippet
git :: Update your local git without cloning

Text

git :: Update your local git without cloning

View Snippet
Ruby / Rails :: Using link_to

Ruby

Ruby / Rails :: Using link_to

View Snippet
React App Template :: global.js

CSS

React App Template :: global.js

View Snippet
React :: build ios and android folders

Text

React :: build ios and android folders

View Snippet
shell :: ssh add / eval

Text

shell :: ssh add / eval

View Snippet
Ruby / Rails :: routes.rb default route

Ruby

Ruby / Rails :: routes.rb default route

View Snippet
Ruby / Rails :: Gems Common

Ruby

Ruby / Rails :: Gems Common

View Snippet
React App Template :: App.js

JavaScript

React App Template :: App.js

View Snippet
Ruby / Rails :: Devise Login for application.html.erb

Ruby

Ruby / Rails :: Devise Login for application.html.erb

View Snippet
Ruby / Rails :: form - select_tag

Ruby

Ruby / Rails :: form - select_tag

View Snippet
Ruby / Rails :: New Gem, Plugin or Engine

Ruby

Ruby / Rails :: New Gem, Plugin or Engine

View Snippet
Javascript :: for loop vs while loop

JavaScript

Javascript :: for loop vs while loop

View Snippet
Javascript :: Recursion II Arrays and Objects

JavaScript

Javascript :: Recursion II Arrays and Objects

View Snippet
shell :: sign chirp.app

Ruby

shell :: sign chirp.app

View Snippet
Capybara :: cheatsheet

Ruby

Capybara :: cheatsheet

View Snippet
Ruby / Rails :: gem install location

Ruby

Ruby / Rails :: gem install location

View Snippet
Ruby / Rails :: rake task

Ruby

Ruby / Rails :: rake task

View Snippet
Ruby / Rails :: Adding a module to rails project

Ruby

Ruby / Rails :: Adding a module to rails project

View Snippet
AOS element animation

Text

AOS element animation

View Snippet