Skip to content

Instantly share code, notes, and snippets.

View alexeygrigorev's full-sized avatar
:octocat:
Githubbing

Alexey Grigorev alexeygrigorev

:octocat:
Githubbing
View GitHub Profile
@DavidWells
DavidWells / aws-lambda-redirect.js
Created June 28, 2018 20:48
How to do a 301 redirect from an AWS lambda function
exports.handler = (event, context, callback) => {
const response = {
statusCode: 301,
headers: {
Location: 'https://google.com',
}
};
return callback(null, response);
}
@alefesta
alefesta / install.sh
Last active November 8, 2021 14:52
A simple gist to setup a standard environment
!#/bin/bash
sudo add-apt-repository universe
sudo apt update
sudo apt install --yes powerline vim git
echo "
# Powerline configuration
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
powerline-daemon -q
@ziritrion
ziritrion / dezoomcamp-vm.md
Last active May 3, 2026 17:46
Quick guide to easily create a VM instance in GCP and set up SSH access with Gcloud SDK

Install and setup Gcloud SDK

  1. Download Gcloud SDK from this link and install it according to the instructions for your OS.
  2. Initialize the SDK following these instructions.
    1. Run gcloud init from a terminal and follow the instructions.
    2. Make sure that your project is selected with the command gcloud config list

Creating a VM instance

  1. From your project's dashboard, go to Cloud Compute > VM instance