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
| @-moz-document domain("stackoverflow.com") { | |
| body.newheader { | |
| padding-top: 0; | |
| } | |
| .so-header { | |
| background-color: #333; | |
| position: relative; | |
| } |
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 the public repository GPG keys | |
| curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
| # Register the Microsoft Ubuntu repository | |
| curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list | |
| # Update apt-get | |
| sudo apt-get update | |
| # Install PowerShell |
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
| 'use strict'; | |
| const exec = require('child_process').exec; | |
| function puts(error, stdout, stderr) { | |
| console.log(stdout); | |
| } | |
| class WebpackShellPlugin { | |
| constructor(options) { |
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
| .container { | |
| background-color: #c1c1c1; | |
| height: 500px; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| } | |
| .btn { | |
| background-color: orange; |
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
| // This function converts the byte to the corresponding amount, be it kilo, mega, GB, etc. | |
| const convertWeightByte = (byte) => { | |
| let sizekiloByte = (byte / 1024); | |
| let sizeMega = (sizekiloByte / 1024); | |
| let sizeGigabyte = (sizeMega / 1024); | |
| let sizeTerabyte = (sizeGigabyte / 1024); | |
| let sizePetabyte = (sizeTerabyte / 1024); | |
| let sizeExabyte = (sizePetabyte / 1024); | |
| if(sizekiloByte > 0 && sizekiloByte <= 1024){ |
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
| 'atom-text-editor[data-grammar="text html nunjucks"]:not([mini])': | |
| 'tab': 'emmet:expand-abbreviation-with-tab' | |
| 'atom-text-editor[data-grammar="source nunjucks"]:not([mini])': | |
| 'tab': 'emmet:expand-abbreviation-with-tab' | |
| #https://github.com/atom/autocomplete-plus/issues/86#issuecomment-82661027 | |
| 'atom-text-editor.autocomplete-active:not([mini])': | |
| 'tab': 'autocomplete-plus:confirm' |
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 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:lottie/lottie.dart'; | |
| class NotiferChanges<T> { | |
| final StreamController<T> _fetchDoneController = StreamController.broadcast(); | |
| changeNavigate(T data) { | |
| _fetchDoneController.add(data); // send an arbitrary event |
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
| const withPWA = require('next-pwa') | |
| module.exports = withPWA({ | |
| pwa: { | |
| dest: 'public' | |
| } | |
| }) |
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
| function withAuthentication(WrappedComponent) { | |
| const ModifiedComponent = (props) => { | |
| if (!props.isAuthenticated) { | |
| return <Redirect to="/login" />; | |
| } | |
| return (<WrappedComponent { ...props } />); | |
| }; | |
| const mapStateToProps = (state) => ({ |
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 config from '../config' | |
| let components = {} | |
| //For each component in the config fiel into an object | |
| for (var i = config.length - 1; i >= 0; i--) { | |
| components[config[i].name] = require(config[i].path).default | |
| } | |
| export default components |
OlderNewer