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/env python3.7 | |
# Import iterm2 library | |
import iterm2 | |
async def main(connection): | |
# Get current window | |
app = await iterm2.async_get_app(connection) | |
window = app.current_terminal_window | |
if window is not None: |
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
exports.handler = (event, context, callback) => { | |
const response = event.Records[0].cf.response; | |
const requestUri = event.Records[0].cf.request.uri; | |
try { | |
if (requestUri.endsWith('.br')) { | |
// the browser to decode using brotli algorithm. | |
addContentEncoding('br', response); | |
} else { | |
if (requestUri.endsWith('.gz')) { |
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
'use strict'; | |
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
exports.handler = async event => { | |
const request = event.Records[0].cf.request; | |
try { | |
if (request.uri && request.headers['accept-encoding']) { |
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
version: "2" | |
syncs: | |
app-code-sync: | |
# Source directory | |
src: '.' | |
# This will exclude the files/folders you specify. | |
sync_excludes: [ | |
'.git' | |
] | |
sync_host_ip: '127.0.0.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
version: '2' | |
services: | |
rails: | |
command: sh -c "rm -r tmp; bundle install; bundle exec rails s -b '0.0.0.0'" | |
volumes: | |
- ".:/webapp" | |
image: baseimage | |
container_name: rails_server |
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
version: '2' | |
services: | |
# The "rails" attribute is the service name in docker-compose.yml | |
rails: | |
volumes: | |
- app-code-sync:/webapp:nocopy | |
volumes: | |
app-code-sync: | |
external: true |