Skip to content

Instantly share code, notes, and snippets.

View jerson's full-sized avatar

Gerson Alexander Pardo Gamez jerson

View GitHub Profile
@jerson
jerson / 00.install-android-sdk.sh
Created April 16, 2024 17:59 — forked from nhtua/00.install-android-sdk.sh
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version
@jerson
jerson / sse.go
Created May 31, 2022 23:42 — forked from Ananto30/sse.go
SSE message stream in Go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
)
@jerson
jerson / flutter_all_fastlane.sh
Created June 17, 2020 22:33 — forked from rodydavis/flutter_all_fastlane.sh
Using Fastlane for Flutter to deploy iOS, Mac, Android and Web
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@jerson
jerson / go-shebang-story.md
Created March 4, 2020 17:15 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@jerson
jerson / macapp.go
Created March 2, 2020 20:02 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:

Keybase proof

I hereby claim:

  • I am jerson on github.
  • I am pardacho (https://keybase.io/pardacho) on keybase.
  • I have a public key ASB445ZhwKsd2yuI2I4ZfdeFlZU-Bu6LP0eCYt3ht54JKQo

To claim this, I am signing this object:

@jerson
jerson / simple-gpg-enc.go
Created July 9, 2019 15:36 — forked from stuart-warren/simple-gpg-enc.go
golang gpg/openpgp encryption/decryption example
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)
version: '3.3'
services:
namenode:
image: uhopper/hadoop-namenode:2.7.2
ports:
- 8020:8020
- 50070:50070
volumes:
- ./tmp/namenode:/hadoop/dfs/name
environment:
version: '3'
services:
drone-server:
image: drone/drone
ports:
- 80:8000
volumes:
- ./drone:/var/lib/drone/
restart: always
<?php
/** @Entity */
class User
{
// ...
/**
* Many User have Many Phonenumbers.
* @ManyToMany(targetEntity="Phonenumber")
* @JoinTable(name="users_phonenumbers",