This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CSS border-left-color example | |
| * http://docs.webplatform.org/wiki/css/properties/border-left-color | |
| */ | |
| body { | |
| margin: 0 auto; | |
| width: 80%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git aliases | |
| alias gs="git status" | |
| alias ga="git add" | |
| alias gc="git commit -m " | |
| alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
| alias gp="git push --all origin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- | |
| // Sass (v3.4.7) | |
| // Compass (v1.0.1) | |
| // ---- | |
| /* Alias */ | |
| $config__tile: ( | |
| "active": ( | |
| "background-color": #4C9CEA, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gcc | |
| libQt5Svg5 | |
| libqt5-qtsvg-devel | |
| libqt5-qtx11extras-devel | |
| libX11-devel | |
| libQt5Widgets-devel | |
| libQt5PlatformHeaders-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| class ExampleComponent extends Component { | |
| componentDidMount() { | |
| const fetchedData = this.fetchDataFromServer(); | |
| // ... do something with fetchedData e.g. set the data | |
| } | |
| async fetchDataFromServer() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { shallow } from 'enzyme'; | |
| import ExampleComponent from './ExampleComponent'; | |
| describe('ExampleComponent', () => { | |
| it('fetches data from server when server returns a successful response', done => { // 1 | |
| const mockSuccessResponse = {}; | |
| const mockJsonPromise = Promise.resolve(mockSuccessResponse); // 2 | |
| const mockFetchPromise = Promise.resolve({ // 3 | |
| json: () => mockJsonPromise, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| /** | |
| * Libdefs for Node’s experimental (as of v10.7.x) core module, perf_hooks. | |
| * | |
| * TODO Work in progress. Add libdefs for other functions in this module. | |
| * | |
| * @see https://nodejs.org/api/perf_hooks.html | |
| */ | |
| declare module 'perf_hooks' { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import logging | |
| import sys | |
| def main(argv=None): | |
| argparser = argparse.ArgumentParser( | |
| description='A boilerplate greeting program!', | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from functools import lru_cache | |
| from spells import cast_spell | |
| @lru_cache(maxsize=2) | |
| def levitate(target): | |
| """ | |
| Levitates `target` with the "Wingardium Leviosa" spell. | |
| :param str target: Object that you would like to levitate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from unittest import mock | |
| import pytest | |
| @pytest.mark.parametrize( | |
| 'ordinary_object', | |
| [ | |
| 'quill', | |
| 'cushion', |