Skip to content

Instantly share code, notes, and snippets.

View larrasket's full-sized avatar

Salih Muhammed larrasket

View GitHub Profile
@flaviocopes
flaviocopes / go-sort-map.go
Last active December 25, 2023 21:03
Go: sort a Map by key #golang
import "sort"
ages := map[string]int{
"a": 1,
"c": 3,
"d": 4,
"b": 2,
}
names := make([]string, 0, len(ages))
@grkvlt
grkvlt / honest-achmed.txt
Created July 7, 2017 18:27
Honest Achmed's Used Cars and Certificates
This is a request to add the CA root certificate for Honest Achmed's Used Cars and Certificates. The requested information as per the CA information checklist is as follows:
1. Name
Honest Achmed's Used Cars and Certificates
2. Website URL
www.honestachmed.dyndns.org
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@mpneuried
mpneuried / Makefile
Last active August 29, 2025 08:17
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@shakthimaan
shakthimaan / input-poem.tex
Last active December 12, 2022 17:50
LaTeX poem style
\documentclass{article}
\usepackage{verse}
\begin{document}
\begin{verse}
\poemlines{3}
\setverselinenums{1}{3}
@charset "utf-8";
table
{
background-color: #ffffff!important;
}
tbody tr td
{
background-color: #ffffff!important;
}
table tbody
@janogarcia
janogarcia / email_coding_guidelines.md
Last active November 26, 2024 15:35
Email Coding Guidelines
@iamatypeofwalrus
iamatypeofwalrus / channel_check.go
Created December 11, 2014 19:31
Check if a Go Channel is open or closed
// An intersting pattern for testing, but you can use the check anywhere
import "testing"
func TestCheckingChannel(t *testing.T) {
stop := make(chan bool)
// Testing some fucntion that SHOULD close the channel
func (stop chan bool) {
close(chan)
}(stop)
@vaskoz
vaskoz / builder.go
Last active January 22, 2024 10:54
Golang Builder pattern
package main
import "strconv"
import "fmt"
type Color string
type Make string
type Model string
const (