Skip to content

Instantly share code, notes, and snippets.

View harshitanand's full-sized avatar
🏠
Working from home

Harshit Anand harshitanand

🏠
Working from home
  • Bangalore, India
View GitHub Profile
@harshitanand
harshitanand / gist:4340feaba4df8170aac9f66f87b070a5
Created December 15, 2016 21:29 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@harshitanand
harshitanand / aws_ec2_root.md
Created March 19, 2018 07:32 — forked from tracend/aws_ec2_root.md
AWS EC2: Steps to enable root access with your local key - Inspired by: https://forums.aws.amazon.com/thread.jspa?threadID=86876

Note: replace {{server}} with your domain or ip

  • Login as the ec2-user
ssh -i key.pem ec2-user@{{server}}
  • Switch to administrator
sudo -i
@harshitanand
harshitanand / Dockerfile
Created November 19, 2019 23:38 — forked from ltwlf/Dockerfile
Base Docker Azure Function Node 10 image with SSH support
FROM mcr.microsoft.com/azure-functions/base
RUN apt-get update && \
apt-get install -y gnupg && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && \
apt-get install -y nodejs
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
@harshitanand
harshitanand / awsDownloadFilesInBucket.js
Created June 7, 2020 12:40 — forked from matthewdfuller/awsDownloadFilesInBucket.js
List and download all files in a given S3 bucket
/* Installation:
* npm install aws-sdk
* npm install async
* node awsDownloadFilesInBucket.js
*/
// SETTINGS
var AWS_KEY = '';
var AWS_SECRET = '';
var BUCKET = '';
@harshitanand
harshitanand / cache.js
Created June 24, 2020 06:14 — forked from lesleh/cache.js
Basic memory cache implementation for JavaScript.
function Cache(config) {
config = config || {};
config.trim = config.trim || 600;
config.ttl = config.ttl || 3600;
var data = {};
var self = this;
var now = function() {
return new Date().getTime() / 1000;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harshitanand
harshitanand / homebrew.md
Created November 30, 2020 09:24 — forked from somecuitears/homebrew.md
Homebrew and UPX Installation Procedure for macOS

UPX detail : Compress/expand executable files;

Open terminal | Command+Space and type Terminal and press enter/return key.

Paste following code :

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
@harshitanand
harshitanand / vscode_shortcuts.md
Created May 3, 2021 09:59 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@harshitanand
harshitanand / lambda.js
Created November 25, 2021 12:44 — forked from kageurufu/lambda.js
AWS Lambda Thumbnailer
var async = require("async");
var AWS = require("aws-sdk");
var gm = require("gm").subClass({imageMagick: true});
var fs = require("fs");
var mktemp = require("mktemp");
var THUMB_KEY_PREFIX = "thumbnails/",
THUMB_WIDTH = 150,
THUMB_HEIGHT = 150,
ALLOWED_FILETYPES = ['png', 'jpg', 'jpeg', 'bmp', 'tiff', 'pdf', 'gif'];
@harshitanand
harshitanand / create-aws-console-user.sh
Created April 15, 2022 05:23 — forked from res0nat0r/create-aws-console-user.sh
Create AWS console user from the awscli
#!/bin/bash
# USAGE: ./create-aws-console-user.sh $GROUPNAME $USERNAME $PASSWORD
# http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi
# Create administrator group
aws iam create-group --group-name $1