git checkout -b <branch>
git reset --hard origin/<branch>
git push --force-with-lease
| // main.js | |
| import objectDifference from './utils/objectDifference' | |
| const obj1 = { | |
| user: { | |
| info: { | |
| username: 'foo' | |
| } | |
| } | |
| } |
| import { Vue, Component, Model, Prop, Watch } from 'vue-property-decorator' | |
| @Component({ | |
| delimiters: ['{{', '}}'], | |
| comments: false, | |
| components: null, | |
| directives: null, | |
| filters: null, | |
| inheritAttrs: true, | |
| }) |
| sr_only | |
| not_sr_only | |
| appearance_none | |
| bg* | |
| border* | |
| rounded* | |
| cursor* | |
| block | |
| inline_block | |
| inline |
| // src/App.jsx | |
| import React from 'react' | |
| import { Provider as CountProvider } from './context/count' | |
| import ShowCount from './components/ShowCount' | |
| const App = () => { | |
| return ( | |
| <CountProvider> | |
| <ShowCount /> | |
| </CountProvider> |
| const MIN_NOTIFICATION_TIME = 5; // 5 Seconds | |
| const MAX_NOTIFICATION_TIME = 10; // 10 Seconds | |
| const TEMPLATE = ({ product, time, location }) => | |
| `Someone bough a <b>${product}</b> from <b>${location}</b> <b>${time} seconds ago</b>`; | |
| const MIN_TIME_AGO = 15; // Min seconds to show when someone purchased something (eg 'Bob bought this x seconds ago') | |
| const MAX_TIME_AGO = 60; // Max seconds to show when someone purchased something (eg 'Bob bought this x seconds ago') | |
| const SHOW_TIME = 10; // Time to display notification for | |
| const CLASS_NAME = "sales-notification"; | |
| const CONTAINER_ID = "sales-notifications"; |
| // This script searches for a package json in current directory, and works it's way up until one is found. | |
| // If no package.json is found, the dev command returned is `develop`. | |
| // If a package.json is found, it reads the scripts section and finds one that matches: 'dev', 'develop', 'start' | |
| // The result returned is `yarn install && yarn run <dev_command>` (with dev_command being the found develop command. | |
| // This can be fed into bash along with an alias defined to create an easy way to run the develop command in projects. | |
| // | |
| // Put this dev.js file in ~/scripts/dev.js | |
| // | |
| // Add this to your .zshrc file (or .bashrc) | |
| // alias dev="node ~/scripts/dev.js | bash" |
| use std::io::Write; | |
| use async_graphql::{InputValueError, InputValueResult, Scalar, ScalarType, Value}; | |
| use diesel::{ | |
| deserialize, | |
| pg::Pg, | |
| serialize::{self, Output}, | |
| sql_types::{self, Timestamp, Timestamptz}, | |
| types::{FromSql, ToSql}, | |
| }; |
| [package] | |
| name = "test" | |
| version = "0.1.0" | |
| edition = "2018" | |
| [dependencies] | |
| actix-web = "4.0.0-beta.4" | |
| tokio = { version = "1", features = ["full"] } |
| [dependencies] | |
| hyper = { version = "0.14", features = ["full"] } | |
| tokio = { version = "1", features = ["full"] } |