Skip to content

Instantly share code, notes, and snippets.

View dzuluaga's full-sized avatar

Diego Zuluaga dzuluaga

View GitHub Profile
// Application Kotlin file to initialize a Map provider
package com.omh.android.maps.sample
import android.app.Application
import com.omh.android.maps.api.factories.OmhMapProvider
class DemoApp : Application() {
override fun onCreate() {
super.onCreate()
@dzuluaga
dzuluaga / gh-issues-with-markdown.go
Created June 28, 2023 17:19
The provided single-line command utilizes the GitHub CLI (gh) to retrieve a list of issues from a repository in JSON format. It then applies a custom template to format and present the issue number, title, author, assignees, creation date, and description.
gh issue list --json number,title,createdAt,assignees,body,author --template \
'# {{printf "GitHub Issues"}}
{{range .}}
## {{printf "#%v" .number}} {{.title}}
## Tester
{{.author.name}}{{if .author.name}} - {{end}}{{.author.login}}
### Assignees
{{range .assignees}}{{.name}} {{.login}} {{if .name}},{{end}}{{end}}
### Created at
{{.createdAt}}
# add this line at the end of ~/.bashrc file
# this alias installs zsh and oh-my-zsh by calling $ install-zsh
# useful for GCP Cloud Shell, which will remove zsh everytime your Cloud Shell container is terminated.
alias install-zsh="curl \"https://gist.githubusercontent.com/dzuluaga/3bf775217728debf360a4377c7eb5118/raw/install-oh-my-zsh-gcp-cloud-shell.sh?$(date +%s)\" | sudo bash"
@dzuluaga
dzuluaga / run-localtunnel-gcp-cloud-shell.sh
Last active August 16, 2021 22:28
Runs localtunnel on GCP Cloud Shell in a single command.
#!/usr/bin/env bash
# Runs localtunnel on GCP Cloud Shell in a single command.
# Run this script directly from the command line
#
# $ curl "https://gist.githubusercontent.com/dzuluaga/b9428ea1a1d1a3fb831c53cbf39316dd/raw/run-localtunnel-gcp-cloud-shell.sh?$(date +%s)" | bash
echo "Installing zsh..."
echo ""
npm install -g localtunnel
@dzuluaga
dzuluaga / install-oh-my-zsh-gcp-cloud-shell.sh
Last active April 29, 2024 16:55
Installs oh-my-zsh on GCP Cloud Shell in a single command.
#!/usr/bin/env bash
# Installs oh-my-zsh on GCP Cloud Shell in a single command.
# Run this script directly from the command line
#
# $ curl "https://gist.githubusercontent.com/dzuluaga/3bf775217728debf360a4377c7eb5118/raw/install-oh-my-zsh-gcp-cloud-shell.sh?$(date +%s)" | sudo bash
#
# you can also append an alias to ~/.bashrc to install-zsh at anytime
#
# alias install-zsh="curl \"https://gist.githubusercontent.com/dzuluaga/3bf775217728debf360a4377c7eb5118/raw/install-oh-my-zsh-gcp-cloud-shell.sh?$(date +%s)\" | sudo bash"
@dzuluaga
dzuluaga / install-ngrok-gcp-cloud-shell.sh
Last active August 16, 2021 22:29
install ngrok in GCP Cloud Shell in a single shot.
#!/usr/bin/env bash
# Installs ngrok on GCP Cloud Shell in a single command
# Run this script directly from the command line
#
# $ curl "https://gist.githubusercontent.com/dzuluaga/b3b18a98c2ba9c326c3e6680301b26b8/raw/install-ngrok-gcp-cloud-shell.sh?$(date +%s)" | sudo bash
echo 'Downloading ngrok...'
curl https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -o ngrok-stable-linux-amd64.zip
#!/usr/bin/env bash
# Replaces the current existing of Gradle with 5.2.1
# Run this script directly from the command line
#
# $ curl "https://gist.githubusercontent.com/dzuluaga/80df9a5316b56c19da982054e335468a/raw/update-gradle-cloud-shell.sh?$(date +%s)" | sudo bash
echo 'Downloading Gradle...'
curl https://downloads.gradle.org/distributions/gradle-5.2.1-bin.zip -o gradle-5.2.1-bin.zip
@dzuluaga
dzuluaga / start_endpoint.sh
Last active February 21, 2019 00:59
Starts an endpoint in Google Cloud Shell
#!/bin/bash
file="$HOME/ngrok"
if [ -f "$file" ]
then
echo "$file found."
else
echo "$file not found. Downloading."
curl https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -o $HOME/ngrok-stable-linux-amd64.zip
unzip $HOME/ngrok-stable-linux-amd64.zip -d $HOME
@dzuluaga
dzuluaga / install-ngrok-on-google-cloud-shell.md
Last active October 7, 2023 18:11
install ngrok on Google Cloud Shell

How to install ngrok in Google Cloud Shell

These steps will surface a public endpoint through ngrok with no authentication.

1. Download ngrok

$ curl https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -o ngrok-stable-linux-amd64.zip
@dzuluaga
dzuluaga / install-cf-cli-google-cloud-shell.md
Last active May 20, 2023 18:20
Install of cf cli on Google Cloud Shell

CF cli Google Cloud Shell Installation

Go to console.cloud.google.com and sign in and start Google Cloud Shell

For Debian and Ubuntu-based Linux distributions, perform the following steps:

Add the Cloud Foundry Foundation public key and package repository to your system:

$ wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -