Skip to content

Instantly share code, notes, and snippets.

Rich Smith richjdsmith

Block or report user

Report or block richjdsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@richjdsmith
richjdsmith / share_on_social.html.erb
Created Jan 25, 2019
Rails Share on Social Media Links No Javascript
View share_on_social.html.erb
<div class="flex">
<%= link_to "https://www.linkedin.com/shareArticle?mini=true&url=#{request.original_url}&title=#{@post.title.gsub(/\s+/, "%20")}&summary=#{@post.description.gsub(/\s+/, "%20")}", target: '_blank', rel: 'noopener', alt: 'Share on LinkedIn', class: 'no-underline mr-1 text-indigo-dark hover:text-indigo-light' do %>
<%= inline_svg('images/linkedin_share_icon.svg', class: 'h-8 w-8 fill-current ', title: 'Share on LinkedIn', width: '100%', height: '100%') %>
<% end %>
<%= link_to "http://twitter.com/share?text=I found this great article: #{@post.title}&url=#{request.original_url}&hashtags=thegoodvine", target: '_blank', rel: 'noopener', alt: 'Share on Twitter', class: 'no-underline mx-1 text-indigo-dark hover:text-indigo-light' do %>
<%= inline_svg('images/twitter_share_icon.svg', class: 'h-8 w-8 fill-current ', title:'Share on Twitter', width: '100%', height: '100%') %>
<% end %>
<%= link_to "https://www.facebook.com/dialog/share?app_id=#{Rails.application.credent
@richjdsmith
richjdsmith / README.md
Last active Nov 27, 2019
Rails 5.2 + Webpacker + Tailwind CSS + StimulusJS && No Sprockets (Asset Pipeline)
View README.md

Ruby on Rails 5.2 with Webpacker, Tailwind, StimulusJS and removing the Asset Pipeline

Alright, because there is nothing online that I could find showing people how to do this, I decided to record it myself so I could get back to this later.

1. New Rails App

Generate the new rails app $rails new <app_name> --webpack=stimulus --skip-sprockets -T --database=postgresql

@richjdsmith
richjdsmith / webpacker_rails.md
Created Nov 2, 2018 — forked from maxivak/webpacker_rails.md
Webpack, Yarn, Npm in Rails
View webpacker_rails.md
@richjdsmith
richjdsmith / Gemfile
Created Feb 7, 2018
5.2 Rails Gem List for SaaS
View Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0.rc1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
@richjdsmith
richjdsmith / vscode-plugins-config.txt
Last active Feb 7, 2018
VS Code Configurations and Plugins for Web Development Workflow: Ruby/Rails/Elixir/Phoenix/HTM/CSS/JS
View vscode-plugins-config.txt
<!-- Plugins: are for a workflow involving
HTML/CSS/JS/Ruby/Rails/Python/Elixir/Phoenix
As well as making things look good. -->
Ayu
Auto Rename Tag
Bracket Pair Colorizer
Code Spell Checker
Color Highlight
ElixirLS
@richjdsmith
richjdsmith / gulpfile.js
Last active Jan 18, 2018
Gulpfile.js Example. Contains task runners for SCSS processing, Image minification, JS concat and uglification, HTML minification and a BrowserSync server.
View gulpfile.js
// Default folder structure:
// dev/{*.html's,/js,/scss,/img}
// build/{*.html's,/js,/css,/img}
// Gulp.js configuration
var
// modules
gulp = require('gulp'),
View brunch-config.js
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"
// To use a separate vendor.js bundle, specify two files path
// http://brunch.io/docs/config#-files-
// joinTo: {
// "js/app.js": /^js/,
View _navigation.html.eex
... <!-- Code removed for readability -->
<div class="top-bar-right">
<ul class="menu">
<%= if @conn.assigns[:user] do %>
<li class="menu-text">
Welcome, <%= @conn.assigns.user.first_name %>!
</li>
<li>
<%= link "Videos", to: video_path(@conn, :index) %>
View gist:dd794ad7463d151b4eacb4e8ff44d9cc

This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.

This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)

Xcode

Make sure you have the latest version of XCode installed. Available from the Mac App Store.

Install the Xcode Command Line Tools:

xcode-select --install
@richjdsmith
richjdsmith / elixir_symbols.md
Created Jul 18, 2017 — forked from h4cc/elixir_symbols.md
All symbols used in the elixir programming language
View elixir_symbols.md

Symbols used in Elixir

A list of all not symbols and notations of elixir. Tried to have a base for comparision for other programming languages.

Operators

  • === (strict)
  • !== (strict)
  • == (relaxed)
You can’t perform that action at this time.