Skip to content

Instantly share code, notes, and snippets.


Kevin Berthier KevinBerthier

View GitHub Profile
nathanhleung /
Last active Jan 23, 2021
Fix macOS Hanging Issue

Fix macOS Hanging Issue


Hey Apple users:

If you're now experiencing hangs launching apps on the Mac, I figured out the problem using Little Snitch.

It's trustd connecting to

dhh / Gemfile
Created Jun 24, 2020
HEY's Gemfile
View Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
rhythnic / vuex-reusable-functions.js
Last active Aug 19, 2020
Reusable Vuex Functions
View vuex-reusable-functions.js
// *******************************************************************
// This gist is now an npm module
// The API of some functions is altered slightly.
// All future work will happen in the repo.
// *******************************************************************
// *******************************************************************
mrmartineau /
Last active Oct 15, 2021
Stimulus cheatsheet
nerdcave / environment.js
Last active May 11, 2021
PurgeCSS config for Rails 5 and Webpacker (along with Tailwind CSS and Vue.js, in this case)
View environment.js
// first run:
// yarn add glob-all purgecss-webpack-plugin --dev
PurgeCSS configuration for Rails 5 + Webpacker + Tailwind CSS + Vue.js
Optionally, put this in production.js if you only want this to apply to production.
For example, your app is large and you want to optimize dev compilation speed.
getHexColor = (color) ->
return "" unless color
return color if /^#/.test(color)
rgbValues = getRGBValues(color)
hexValues =
"#" + hexValues.join("")
numberToHex = (number) ->
przbadu /
Last active Jul 30, 2021
Vue js and Rails integration

Setup Rails and Vuejs

  1. Generate new rails app using --webpack flag
rails new myApp --webpack=vue


  1. You can use --webpack=angular for angular application and --webpack=react for react.
DmytroLukianov / capistrano_rails_console.rb
Created Jul 27, 2017
Rails console for capistrano and rbenv
View capistrano_rails_console.rb
namespace :rails do
desc "Open the rails console"
task :console do
on roles(:app) do
rails_env = fetch(:rails_env, 'production')
execute_interactively "$HOME/.rbenv/bin/rbenv exec bundle exec rails console #{rails_env}"
desc "Open the rails dbconsole"
martinrisseeuw / correct.vue
Last active Jun 2, 2020
Mapbox Nuxt component
View correct.vue
<div id="map" class="map">
<div class="button-bar">
<button v-on:click="addMapLayer()">terrain</button>