| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| { | |
| "compilerOptions": { | |
| "plugins": [ | |
| { | |
| "name": "@unsplash/ts-namespace-import-plugin", | |
| "namespaces": { | |
| "A": { | |
| "importPath": "fp-ts/Array" | |
| }, | |
| "B": { |
| #if macro | |
| import haxe.macro.Context; | |
| import haxe.macro.Expr; | |
| import haxe.macro.TypeTools; | |
| #end | |
| @:remove // Doesn't seem to work on lua, eh | |
| interface Job<TJobOpt:{}> {} | |
| @:pure |
| language: node_js | |
| cache: yarn | |
| node_js: | |
| - "8.9.0" | |
| branches: | |
| only: | |
| - master | |
| script: # this are lerna-setup related | |
| - npm run npm-setup | |
| - npm run publish -- --yes --skip-git # lerna does not pick the correct repo url, so skip git |
| #!/bin/bash | |
| # function to make a commit on a branch in a Travis CI build | |
| # be sure to avoid creating a Travis CI fork bomb | |
| # see https://github.com/travis-ci/travis-ci/issues/1701 | |
| function travis-branch-commit() { | |
| local head_ref branch_ref | |
| head_ref=$(git rev-parse HEAD) | |
| if [[ $? -ne 0 || ! $head_ref ]]; then | |
| err "failed to get HEAD reference" | |
| return 1 |
| var axios = require('axios'); | |
| var join = require('url-join'); | |
| // https://github.com/sindresorhus/is-absolute-url/blob/master/index.js#L7 | |
| var isAbsoluteURLRegex = /^(?:\w+:)\/\//; | |
| axios.interceptors.request.use(function(config) { | |
| // Concatenate base path if not an absolute URL | |
| if ( !isAbsoluteURLRegex.test(config.url) ) { | |
| config.url = join('http://my-api.com', config.url); |
brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgentsReplace /usr/local/etc/nginx/nginx.conf with the nginx.conf in this gist. I'm using port 5000 for my current project. Obviously, change server_name as well, and probably the name of its access log.
| window.npup = (function (doc) { | |
| var sheets = doc.styleSheets; | |
| var hash = {}, sheet, rules, rule, url, match; | |
| // loop the stylesheets | |
| for (var sheetIdx=0, sheetsLen=sheets.length; sheetIdx<sheetsLen; ++sheetIdx) { | |
| sheet = sheets[sheetIdx]; | |
| // ie or w3c stylee rules property? | |
| rules = sheet.rules ? sheet.rules : sheet.cssRules; | |
| // loop the rules | |
| for (var ruleIdx=0, rulesLen=rules.length; ruleIdx<rulesLen; ++ruleIdx) { |
| def color(text, *user_styles): | |
| styles = { | |
| # styles | |
| 'reset': '\033[0m', | |
| 'bold': '\033[01m', | |
| 'disabled': '\033[02m', | |
| 'underline': '\033[04m', | |
| 'reverse': '\033[07m', |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.
The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.