git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
from rest_framework import mixins | |
from rest_framework.generics import SingleObjectAPIView | |
from yourapp.mixins import PartialUpdateModelMixin | |
class RetrievePartialUpdateDestroyAPIView(PartialUpdateModelMixin, | |
mixins.RetrieveModelMixin, | |
mixins.UpdateModelMixin, | |
mixins.DestroyModelMixin, | |
SingleObjectAPIView): |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
a { font-size: calc(calc(calc(1rem * 0.75) * 1.5) - 1px); } | |
a { color: color(rebeccapurple a(-10%)); } | |
a { color: hwb(0, 10%, 20%); } | |
a { color: color(color(red a(+10%)));} | |
a { color: color(color(rebeccapurple a(-10%)) a(-10%)); } |
machine: | |
services: | |
- docker | |
dependencies: | |
cache_directories: | |
- "~/docker" | |
override: | |
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS tutum.co |
/** | |
* Inspired by XRegExp via 2ality | |
* http://www.2ality.com/2012/12/template-strings-xregexp.html | |
* http://xregexp.com/ | |
*/ | |
import test from 'ava'; | |
export function rx(flags) { | |
const trailingComments = /\s+#.*$/gm; |
query IntrospectionQuery { | |
__schema { | |
queryType { name } | |
mutationType { name } | |
subscriptionType { name } | |
types { | |
...FullType | |
} | |
directives { |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
import React from 'react'; | |
import { storiesOf } from '@storybook/react'; | |
// 1. import axios and MockAdapter | |
import axios from 'axios'; | |
import MockAdapter from 'axios-mock-adapter'; | |
// 2. create the mock | |
const mock = new MockAdapter(axios); |