Skip to content

Instantly share code, notes, and snippets.

Avatar
🐒

Gerson Alexander Pardo Gamez jerson

🐒
View GitHub Profile
@jerson
jerson / sse.go
Created May 31, 2022 — forked from Ananto30/sse.go
SSE message stream in Go
View sse.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
)
@jerson
jerson / flutter_all_fastlane.sh
Created Jun 17, 2020 — forked from rodydavis/flutter_all_fastlane.sh
Using Fastlane for Flutter to deploy iOS, Mac, Android and Web
View flutter_all_fastlane.sh
# 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 Mar 4, 2020 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go
View go-shebang-story.md

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 Mar 2, 2020 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
View macapp.go
// 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:
View keybase.md

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 Jul 9, 2019 — forked from stuart-warren/simple-gpg-enc.go
golang gpg/openpgp encryption/decryption example
View simple-gpg-enc.go
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)
View docker-compose.yml
version: '3.3'
services:
namenode:
image: uhopper/hadoop-namenode:2.7.2
ports:
- 8020:8020
- 50070:50070
volumes:
- ./tmp/namenode:/hadoop/dfs/name
environment:
View drone.yml
version: '3'
services:
drone-server:
image: drone/drone
ports:
- 80:8000
volumes:
- ./drone:/var/lib/drone/
restart: always
View manytomany.php
<?php
/** @Entity */
class User
{
// ...
/**
* Many User have Many Phonenumbers.
* @ManyToMany(targetEntity="Phonenumber")
* @JoinTable(name="users_phonenumbers",
View security.yml
# you can read more about security in the related section of the documentation
# http://symfony.com/doc/current/book/security.html
security:
# http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password
encoders:
Symfony\Component\Security\Core\User\User: plaintext
# http://symfony.com/doc/current/book/security.html#hierarchical-roles
role_hierarchy:
ROLE_ADMIN: ROLE_USER