Requirements
- macOS
- blueutil
- Hammerspoon
Instructions
-
Get Hammerspoon here
-
Get
blueutil
# Start AeroSpace at login | |
start-at-login = true | |
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization | |
enable-normalization-flatten-containers = true | |
enable-normalization-opposite-orientation-for-nested-containers = true | |
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts | |
# The 'accordion-padding' specifies the size of accordion padding | |
# You can set 0 to disable the padding feature | |
accordion-padding = 30 |
### README FIRST | |
# RuboCop: | |
# This template replaces rails rubocop omakase with it's own rubocop config | |
# Please use "--skip-rubocop" flag | |
gem_group :development, :test do | |
gem "factory_bot_rails" | |
gem "faker" | |
gem "rspec-rails" | |
gem "rubocop" |
const envName = altair.helpers.getEnvironment('envName') | |
const tokenKey = `${envName}:csrfToken` | |
// Uncomment This to fetch new csrf token | |
// ---- | |
// const regex = /<meta name="csrf-token" content="\S+" \/>/gm; | |
// const url = altair.helpers.getEnvironment('url') | |
// const csrfDomStr = await fetch(url).then(response=>response.text()) |
Requirements
Instructions
Get Hammerspoon here
Get blueutil
class AwesomeSort | |
class Sortee | |
def initialize(sortee) | |
@sortee = sortee | |
end | |
def by(*args, **kwargs) | |
sort(args.map { |it| [it, :asc] }.to_h.merge(kwargs)) | |
end |
unbind-key -n C-a | |
set -g prefix ^A | |
set -g prefix2 F12 | |
bind a send-prefix | |
unbind-key -n F2 | |
bind-key -n M-t new-window -c "#{pane_current_path}" \; rename-window "-" | |
unbind-key -n C-F2 | |
bind-key -n M-d display-panes \; split-window -h -c "#{pane_current_path}" | |
unbind-key -n S-F2 |
import React, { useMemo, forwardRef, useState, useEffect } from 'react' | |
import PropTypes from 'prop-types' | |
import { makeStyles, Paper, Slide, ClickAwayListener } from '@material-ui/core' | |
const useStyles = makeStyles(function (theme) { | |
return ( | |
{ | |
root: { | |
backgroundColor: theme.palette.background.paper, | |
flexGrow: 1, |
module DummyRelations | |
def has_many(relation_name) | |
class_eval do | |
define_method(relation_name) do | |
instance_variable_get("@#{relation_name}") || [] | |
end | |
define_method("#{relation_name}=") do |value| | |
instance_variable_set("@#{relation_name}", Array(value)) | |
end |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { Router, Route } from 'react-router-dom' | |
import Dashboard from '../src/pages/Dashoard' | |
import Login from '../src/pages/Login' | |
const ReactiveDashboard = () => ( | |
<Router> | |
<Route path='/login' component={Login} /> | |
<Route exact path='/' component={Dashboard} /> |
This gist will collect all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test