do_this.rb
class DoThis
include Interactor
def call
begin
if context.fail_this
context.fail!(error: "this failed")
end
| # in osx terminal | |
| echo Hello # echo string | |
| echo ${SHELL} # echo shell (zsh is the default shell in OSX) | |
| # switch to iterm2 https://iterm2.com/ | |
| echo ${SHELL} # still zsh | |
| pwd # print working directory | |
| ls # list |
do_this.rb
class DoThis
include Interactor
def call
begin
if context.fail_this
context.fail!(error: "this failed")
end
| #sudo write to a file without exiting | |
| :w !sudo tee % | |
| #jump to end of file | |
| shift + g | |
| #search/highlight a word | |
| ?word | |
| #toggle line numbers |
| [ | |
| { | |
| "sku": "1", | |
| "name": "Brake Pads", | |
| "price": "30.00", | |
| "description": "" | |
| }, | |
| { | |
| "sku": "2", | |
| "name": "Muffler", |
| !function(t){function webpackJsonpCallback(e){for(var o,a,i=e[0],l=e[1],s=0,d=[];s<i.length;s++)a=i[s],n[a]&&d.push(n[a][0]),n[a]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(t[o]=l[o]);for(r&&r(e);d.length;)d.shift()()}var e={},n={2:0};function __webpack_require__(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}__webpack_require__.e=function requireEnsure(t){var e=[],o=n[t];if(0!==o)if(o)e.push(o[2]);else{var a=new Promise(function(e,a){o=n[t]=[e,a]});e.push(o[2]=a);var i=document.getElementsByTagName("head")[0],r=document.createElement("script");r.charset="utf-8",r.timeout=12e4,__webpack_require__.nc&&r.setAttribute("nonce",__webpack_require__.nc),r.src=__webpack_require__.p+""+t+".bundle.js";var l=setTimeout(function(){onScriptComplete({type:"timeout",target:r})},12e4);function onScriptComplete(e){r.onerror=r.onload=null,clearTimeout(l);var o=n[t];if(0!==o){if(o){var a=e&&("load"===e.type?"missing":e.ty |
| { | |
| "extends": [ | |
| "airbnb", | |
| "prettier/react" | |
| ], | |
| "plugins": [ | |
| "prettier" | |
| ], | |
| "env": { | |
| "browser": true, |
| { | |
| "extends": [ | |
| "airbnb", | |
| "prettier/react" | |
| ], | |
| "plugins": [ | |
| "prettier" | |
| ], | |
| "env": { | |
| "browser": true, |
| import React from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| const App = () => ( | |
| <div className="App"> | |
| <div className="App-header"> | |
| <img src={logo} className="App-logo" alt="logo" /> | |
| <h2>Welcome to React</h2> | |
| </div> |
| import React, {Component} from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| const App = () => ( | |
| <div className="App"> | |
| <div className="App-header"> | |
| <img src={logo} className="App-logo" alt="logo"/> | |
| <h2>Welcome to React</h2> | |
| </div> |
| import React, { Component } from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <div className="App"> | |
| <div className="App-header"> | |
| <img src={logo} className="App-logo" alt="logo" /> |