Skip to content

Instantly share code, notes, and snippets.

View ashishtilara's full-sized avatar
🤓

Ashish Tilara ashishtilara

🤓
  • Sydney
  • 00:27 (UTC +10:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ashishtilara on github.
  • I am ashishtilara (https://keybase.io/ashishtilara) on keybase.
  • I have a public key ASDCKBBUnVFOHANvi-vdMSH-Pgb7MPS0ZCiwFS1YOKd9Kwo

To claim this, I am signing this object:

@ashishtilara
ashishtilara / S3-CORS-Policy.json
Last active November 6, 2021 13:10
node.js: S3 getSignedUrl and createPresignedPost example
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST"
],
"AllowedOrigins": [
@ashishtilara
ashishtilara / aws_cloudformation_s3_hosting.yml
Created May 14, 2021 12:25 — forked from Al-un/aws_cloudformation_s3_hosting.yml
AWS CloudFormation configuration for a HTTPS S3 static hosting: S3+Route53+CloudFront
# AWS CloudFormation template file follows the following anatomy:
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
# More documentation in the API reference:
# https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html
# As-of 2020, "2010-09-09" is the latest FormatVersion:
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html
AWSTemplateFormatVersion: 2010-09-09
Description: S3 / Route53 / CloudFront CloudFormation configuration
@ashishtilara
ashishtilara / current-git-commit-in-folders.sh
Last active January 27, 2021 05:00
Loop all directories and find the latest commit locally
#!/usr/bin/env bash
for d in ~/dev/*
do
if [ -d "$d" ]
then
cd $d
hash=$(git rev-parse HEAD)
name=$(printf "%25s\n" $(basename $d))
echo "$name - $hash"
@ashishtilara
ashishtilara / iterm2-solarized.md
Created February 24, 2019 03:23 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@ashishtilara
ashishtilara / angular-csv-upload.js
Last active October 14, 2016 00:35
angular-csv-upload html5
var ctrl,
module;
module = ng.module("SYS.Directive.FileReader", [
"ng"
]);
ctrl = function ($parse) {
return {
restrict: "A",
scope: false,
link: function (scope, element, attrs) {
//copied from http://blog.ionic.io/screencast-ionic-and-sqlite/
.service('DBService', function($q) {
var items;
var db;
var self = this;
this.initDB = function() {
return db = new PouchDB('simpleDB', {
adapter: 'websql'
});