Skip to content

Instantly share code, notes, and snippets.

Avatar
🛩️
Flying @asyncapi airlines

Sergio Moya smoya

🛩️
Flying @asyncapi airlines
View GitHub Profile
@kevinswiber
kevinswiber / websocket_handshake_probe.sh
Created Nov 12, 2021
A simple bash script for checking if a WebSocket endpoint is alive.
View websocket_handshake_probe.sh
#!/bin/bash
self=`basename "$0"`
if (($# == 0)); then
cat <<EOF
Usage: $self url
Example: $self http://localhost:3000/echo
Check if a URL is returning a valid WebSocket handshake response.
@thomaspoignant
thomaspoignant / Makefile
Last active Nov 22, 2022
My ultimate Makefile for Golang Projects
View Makefile
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@kshcherban
kshcherban / aws-mfa.sh
Last active Sep 1, 2021
Simple script to set AWS creds with MFA auth, just put it in your bashrc like `alias mfa='. ~/.local/bin/aws-mfa.sh $@'`
View aws-mfa.sh
#!/bin/bash
#set -eo pipefail
#
# Sample for getting temp session token from AWS STS
#
# aws --profile youriamuser sts get-session-token --duration 3600 \
# --serial-number arn:aws:iam::012345678901:mfa/user --token-code 012345
#
# 1 or 2 args ok
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active Nov 24, 2022
Go (Golang) Standard Library Interfaces (Selected)
View go-stdlib-interface-selected.md

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@ldez
ldez / gmail-github-filters.md
Last active Nov 23, 2022
Gmail and GitHub - Filters
View gmail-github-filters.md

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
View Freelancer_hourly_monthly_rate.markdown

How to calculate your hourly rate as a freelancer?

Many people struggle with this question. Some just try to make as much as a full-time employee makes (and ignore that they won't be able to bill as many days). Others follow tips on startup related websites that suggest to ask for 20% to 50% more than an salary would yield (and ignore the additional risk and expenses they have).

Below you will find some numbers to help you calculate how high your hourly or daily rate should be.

Your yearly income should be higher than an average salary

  • You take more risk than full time employees, phases without income are likely
@smiller171
smiller171 / godeps-full.sh
Last active Jun 12, 2017
List all go dependencies that are not in the standard library
View godeps-full.sh
go list -f '{{join .Deps "\n"}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
@jimbojsb
jimbojsb / gist:1630790
Created Jan 18, 2012
Code highlighting for Keynote presentations
View gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: