Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
zulhfreelancer / README.md
Created May 15, 2019 04:46
S3 Website + CloudFront - how to show index.html content when at /sub-directory/ path?

Problem

We have index.html file in S3 bucket under a folder called /about-us/. When checking in browser using CloudFront distribution link, custom-domain.com/about-us/ shows AccessDenied error.

But, custom-domain.com/about-us/index.html works fine and show content.

What we want

We want custom-domain.com/about-us/ to show the index.html content.

@klang
klang / output.txt
Created December 11, 2015 08:57
An easy way to specify a destination as a single input parameter and still be able to get the individual data elements back again.
[klang@ergates bin]$ split_destination-test.sh
destination user@host.with.full.domain:/full/path/to/install/package.ext
server host.with.full.domain
servershort host
user user
fullpath /full/path/to/install/package.ext
path /full/path/to/install/
package package.ext
@josef-pkt
josef-pkt / try_distance_corr.py
Created June 15, 2012 19:48
distance covariance and correlation
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 15 14:00:29 2012
Author: Josef Perktold
License: MIT, BSD-3 (for statsmodels)
http://en.wikipedia.org/wiki/Distance_correlation
Yaroslav and Satrajit on sklearn mailing list
@tomerd
tomerd / gauge.js
Last active April 21, 2024 21:08
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;