Skip to content

Instantly share code, notes, and snippets.

View KevinBerthier's full-sized avatar

Kevin Berthier KevinBerthier

View GitHub Profile
@nathanhleung
nathanhleung / FIX-MACOS-HANG.md
Last active February 24, 2024 08:25
Fix macOS Hanging Issue

Fix macOS Hanging Issue

Problem

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 http://ocsp.apple.com >

@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's 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
rhythnic / vuex-reusable-functions.js
Last active October 21, 2022 07:41
Reusable Vuex Functions
// *******************************************************************
// ATTENTION
// This gist is now an npm module
// The API of some functions is altered slightly.
// All future work will happen in the repo.
//
// https://gitlab.com/rhythnic/vuex-intern
// *******************************************************************
// *******************************************************************
@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@nerdcave
nerdcave / environment.js
Last active May 11, 2021 12:27
PurgeCSS config for Rails 5 and Webpacker (along with Tailwind CSS and Vue.js, in this case)
// first run:
// yarn add glob-all purgecss-webpack-plugin --dev
/*
config/webpack/environment.js
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 = rgbValues.map(numberToHex)
"#" + hexValues.join("")
numberToHex = (number) ->
"0#{number.toString(16)}".slice(-2).toUpperCase()
@przbadu
przbadu / _vue-rails.md
Last active July 16, 2022 21:48
Vue js and Rails integration

Setup Rails and Vuejs

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

Note:

  1. You can use --webpack=angular for angular application and --webpack=react for react.
@DmytroLukianov
DmytroLukianov / capistrano_rails_console.rb
Created July 27, 2017 15:36
Rails console for capistrano and rbenv
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}"
end
end
desc "Open the rails dbconsole"
@martinrisseeuw
martinrisseeuw / correct.vue
Last active June 2, 2020 04:35
Mapbox Nuxt component
<template>
<div id="map" class="map">
<div class="button-bar">
<button v-on:click="addMapLayer()">terrain</button>
</div>
</div>
</template>
<script>