This file contains 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 | |
# set -x | |
# Jesse Pearson | |
# Shell script to output all Confluence Spaces to PDF and optionally | |
# push them to a SMB or some other share. | |
# | |
# Dependencies: | |
# wget | |
# | |
# Optional dependencies: |
This file contains 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
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.provider :virtualbox do |v| | |
v.gui = true | |
v.memory = 2048 | |
end | |
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"` | |
# to make synced folder works. |
This file contains 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 fs from 'fs'; | |
import path from 'path'; | |
import { graphql } from 'graphql'; | |
import { introspectionQuery } from 'graphql/utilities'; | |
import schema from './src/schema/index'; | |
(async () => { | |
const result = await graphql(schema, introspectionQuery); | |
if (result.errors) { | |
console.error( |
This file contains 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
location ~* \.(txt|log|xml|css|js)$ { | |
add_header X-Robots-Tag noindex; | |
} |
This file contains 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
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
This file contains 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 | |
##################################################################################################### | |
# Cache Warmer | |
# | |
# Useage: cache-warmer.sh ...args | |
# | |
# This script grabs the sitemap of the site you wish to warm, then grep the urls to wget each one | |
# to cache it on the server. I'm sure there are better ways to do this, but this was a simple enough | |
# method for my needs. I didn't want to have to type in the urls each time I warmed their cache, so | |
# I just made simple functions with short names to feed those urls into the cache warming function. |
This file contains 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
{ | |
"name": "aws-amplify-documentation", | |
"version": "1.0.0", | |
"description": "AWS Amplify Documentation", | |
"main": "index.md", | |
"dependencies": {}, | |
"devDependencies": { | |
"broken-link-checker": "^0.7.8", | |
"markdown-spellcheck": "^1.3.1", | |
"write-good": "^0.13.1" |
This file contains 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
extends: [[spectral:oas, all]] | |
rules: | |
# Default spectral OAS rules | |
# https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/reference/openapi-rules.md | |
oas3-unused-components-schema: false | |
operation-default-response: false | |
# Custom rules | |
tag-descriptions: | |
description: Tags must have a description. | |
given: $.tags[*] |
This file contains 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
#!/usr/bin/python | |
""" | |
Download a specific folder from a github repo: | |
gitget.py https://github.com/divs1210/kilvish/tree/master/examples/bricksnball | |
""" | |
__author__ = 'Divyansh Prakash' | |
import sys | |
import subprocess |
This file contains 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
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |