- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
| #!/usr/bin/env node | |
| /* eslint-disable no-console */ | |
| /** | |
| * Copyright (c) HashiCorp, Inc. | |
| * SPDX-License-Identifier: MPL-2.0 | |
| */ | |
| // edited to work with the appdir by @raphaelbadia | |
| const path = require('path'); |
| const overlayGroupTags = []; | |
| for (var i = 0; i <= (0x00ee0000); i += (0x00020000)) { | |
| overlayGroupTags.push((0x60000000 + i)); | |
| } | |
| imageRendered(e) { | |
| const eventData = e.detail; | |
| if (eventData && eventData.image && eventData.image.$presentationStateDataSet) { |
| server { | |
| listen 80; | |
| root /usr/share/nginx/html; | |
| gzip on; | |
| gzip_types text/css application/javascript application/json image/svg+xml; | |
| gzip_comp_level 9; | |
| etag on; | |
| location / { | |
| try_files $uri $uri/ /index.html; | |
| } |
| import React from 'react' | |
| import { BrowserRouter as Router, Switch } from 'react-router-dom' | |
| import routes from './routes' | |
| import FancyRoute from './components/tools/FancyRoute' | |
| const App = props => | |
| <Router> | |
| <Switch> | |
| {routes.map((route, i) => | |
| <FancyRoute key={i} {...route} /> |
| $version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version" | |
| $buildCounter = "%build.counter%" | |
| $buildNumber = "$version.$buildCounter" | |
| Write-Host "##teamcity[buildNumber '$buildNumber']" |
Workbox runtime caching recipes
Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
// Placeholder array populated automatically by workboxBuild.injectManifest()| node_modules | |
| dist/ | |
| yarn.lock | |
| wwwroot |
Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.
The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.
<script>
// require vue-resource...
new Vue({I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.