Skip to content

Instantly share code, notes, and snippets.

View kunday's full-sized avatar

Arvind Kunday kunday

View GitHub Profile
@kunday
kunday / Gemfile
Created June 21, 2019 03:04
Sorbet: Type Annotations for Ruby
source "https://rubygems.org"
# redacted gems
gem 'sorbet', '~> 0.4.4263', group: :development
gem 'sorbet-runtime'
@kunday
kunday / lambda_function.py
Created March 28, 2019 03:58
Example Lambda function
from newspaper import Article
import dateutil.parser
import time
def lambda_handler(event, context):
url = event['url']
article = Article(url, keep_article_html=True)
return article.text
@kunday
kunday / package.bash
Last active March 28, 2019 03:30
Generate Package using docker-compose and zip
#!/usr/bin/env bash
set -ex
echo "Generating artifacts using docker-compose"
docker-compose up package
echo "Generating lambda_function.zip artifact"
(cd tmp && zip -r9 ../package/lambda_function.zip *)
@kunday
kunday / generate-artefact.bash
Created March 28, 2019 02:36
Generate Artifact inside docker container
#!/usr/bin/env bash
set -ex
echo "Cleaning up old caches"
rm -rf /data/tmp/*
rm -rf /data/package/*.zip
echo "Installing Packages"
@kunday
kunday / docker-compose.yml
Last active March 28, 2019 02:34
Docker Compose to build AWS Lambda Python Locally
version: '3.7'
services:
debug:
image: lambci/lambda:python3.7
entrypoint: /bin/bash
volumes:
- .:/data
package:
image: lambci/lambda:python3.7
@kunday
kunday / launch.json
Created March 25, 2019 11:30
operator.launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug S3 Operator",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/manager/main.go",
"env": {
@kunday
kunday / init-kube.sh
Created January 11, 2019 03:11
Install MicroK8s
#!/usr/bin/env bash
echo "Installing microk8s."
sudo snap install microk8s --classic --edge
sudo snap alias microk8s.kubectl kubectl
echo "Waiting for 60 seconds for the service to come up."
sleep 60
microk8s.kubectl config view --raw > $HOME/.kube/config
@kunday
kunday / realestate.com.au.monthly.user.js
Last active May 10, 2017 03:05
Show Realestate Prices always in monthly.
// ==UserScript==
// @name Weekly To Monthly Crap
// @namespace http://www.realestate.com.au/*
// @version 1
// @grant none
// ==/UserScript==
const UpdatePrices = function() {
var elements = document.querySelectorAll('.priceText');
@kunday
kunday / .eslintrc.js
Last active May 7, 2017 09:00
Make JIRA amazing again.
module.exports = {
"extends": "airbnb-base",
"plugins": [
"import"
]
};
@kunday
kunday / keybase.md
Created March 3, 2017 08:29
keybase.md

Keybase proof

I hereby claim:

  • I am kunday on github.
  • I am kunday (https://keybase.io/kunday) on keybase.
  • I have a public key ASCkKeAVTg_lFMJoVmvflhv5NptAPZyARFI28bmKxnidDQo

To claim this, I am signing this object: