Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
| # From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |
| <!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site --> | |
| <script> | |
| !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
| n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
| n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
| t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
| document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
| fbq('init', '{{facebook pixel}}'); | |
| fbq('track', 'PageView'); | |
| </script> |
| import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue.js'; | |
| const WHITELIST = ['UIManager']; | |
| const NOOP = () => { }; | |
| let queue = []; | |
| let now = 0; | |
| export default { | |
| start() { | |
| MessageQueue.spy(msg => { |
git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch
# show up which remote branch a local branch is tracking
git branch -vvsets the default remote branch for the current local branch.
Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params when you had a long URI with multiple parameters and nested routes.
Let's say you're building routes for a website www.music.com. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.
At our application level, we could first have a Router to handle any requests to our albums.
const express = require('express');For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode| /* eslint-disable prefer-template */ | |
| const path = require('path'); | |
| const aliases = require('./aliases'); | |
| // /////////////////////////////////////////////////////////////// | |
| // ////////////////// PLUGINS //////////////////////////////// | |
| // /////////////////////////////////////////////////////////////// | |
| const commonPlugins = [ |