Create the rails project
$ rails new capistrano-rails
$ cd capistrano-rails
Initialize Git
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
# Render Partials in ECO-Templates like in Rails-ERB | |
# | |
# usefull to clean up structure in spine.js and other js-mvc´s like backbone | |
# | |
# usage: | |
# <%- render_partial 'path/to/partial' %> .. will render ../spine-app/views/path/to/_partial.jst.eco | |
# <%- render_partial 'path/to/partial', foo: 'bar' %> .. will render ../spine-app/views/path/to/_partial.jst.eco .. locals = @foo | |
# | |
window.render_partial = ( path, options = {} ) -> | |
# add the leading underscore (like rails-partials) |
# MAC Address | |
(1..6).collect { "%02x" % [rand(255)] }.join(":").upcase | |
# IP Adress | |
4.times.collect { rand(128) }.join(".") | |
# Port | |
1024 + rand(64512) |
//Usage | |
import React from 'react'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Route from './AuthRoute'; | |
import Login from './Login'; | |
import Private from './Private'; | |
export default () => | |
<Router> |
function flatten(object, separator = '.') { | |
const isValidObject = value => { | |
if (!value) { | |
return false | |
} | |
const isArray = Array.isArray(value) | |
const isObject = Object.prototype.toString.call(value) === '[object Object]' | |
const hasKeys = !!Object.keys(value).length |
I hereby claim:
To claim this, I am signing this object:
// BASICS | |
// ~~~~~~~~~~~~~~~~ | |
// get directory info | |
ls -al (| grep ? ) | |
// markers (first letter) | |
d = directory | |
l = symlinked | |
- = file |