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() { | |
| var CSSCriticalPath = function(w, d, opts) { | |
| var opt = opts || {}; | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
| var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
| for(var i = 0; i < styles.length; i++) { | |
| if(!!styles[i] === false) continue; | |
| var pair = styles[i].split(": "); |
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
| #!/bin/bash | |
| # This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
| # There are six variants that I have built: | |
| # - pre-commit: stops commits to master/main/develop branches. | |
| # - pre-commit-2: also includes a core.whitespace check. | |
| # - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
| # - pre-commit-4: only the core.whitespace check. | |
| # - pre-commit-5: elixir formatting check. | |
| # - pre-commit-6: prettier formatting check. | |
| # Set the desired version like this before proceeding: |
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
| /* Jest test of axios XHR calls */ | |
| describe('axios', function() { | |
| var axios; | |
| beforeEach(function() { | |
| axios = require('axios'); | |
| }); | |
| pit('successful mock HTTP request', function() { | |
| var reqP = axios |
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() | |
| { | |
| 'use strict'; | |
| angular | |
| .module('Controllers') | |
| .controller('MyController', MyController); | |
| /* @ngInject */ | |
| function MyController($scope, MyService) |
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
| { | |
| "reporterEnabled": "spec, mocha-junit-reporter", | |
| "mochaJunitReporterReporterOptions": { | |
| "mochaFile": "./test-results/test-contract-results.xml" | |
| } | |
| } |
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
| deploy: | |
| working_directory: ~/app | |
| machine: | |
| image: circleci/classic:latest | |
| steps: | |
| - checkout | |
| - attach_workspace: | |
| at: ./ | |
| - run: | |
| name: Load Docker images |
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 { execSync } = require('child_process') | |
| const { createHash } = require('crypto') | |
| const invertColor = require('invert-color') | |
| const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
| const hash = createHash('sha256') | |
| hash.update(branchName) | |
| const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
| const invertedColor = invertColor(color, true) |
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
Show hidden characters
| // I'm tired of extensions that automatically: | |
| // - show welcome pages / walkthroughs | |
| // - show release notes | |
| // - send telemetry | |
| // - recommend things | |
| // | |
| // This disables all of that stuff. | |
| // If you have more config, leave a comment so I can add it!! | |
| { |
OlderNewer