Skip to content

Instantly share code, notes, and snippets.

View eugercek's full-sized avatar

Emin Umut Gerçek eugercek

View GitHub Profile
@thomaspoignant
thomaspoignant / Makefile
Last active June 24, 2024 22:54
My ultimate Makefile for Golang Projects
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)
@gnuton
gnuton / gist:6a02225b0cbff6547b78723564aee63c
Created November 22, 2019 11:38
AWS SES send file with attachment in bash
function sendCSVviaEmail {
echo "Sending file via email..."
AWS_CLI="/usr/bin/aws"
SENDER=${EMAIL_SENDER}
RECIPIENT=${EMAIL_RECIPIENT}
SUBJECT=${EMAIL_SUBJECT}
BODY=${EMAIL_BODY}
ATTACHMENT_TYPE="text/plain"
ATTACHMENT_FILE_NAME="report.csv"
@douglasmakey
douglasmakey / sender.go
Last active June 7, 2024 15:02
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@miguelmota
miguelmota / server.go
Last active April 12, 2024 23:13
Golang TCP server example
package server
import (
"bufio"
"fmt"
"log"
"net"
)
// Server ...
@Manikkumar1988
Manikkumar1988 / slack_upload.sh
Created September 21, 2017 11:56
CURL command to upload file on Slack
curl https://slack.com/api/files.upload -F token="${SLACK_TOKEN}" -F channels="${SLACK_CHANNEL}" -F title="${message_title}" -F filename="${filename}" -F file=@"${path_to_file}"

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

for k in $(git branch | sed /\*/d); do
if [ -n "$(git log -1 --before='1 month ago' -s $k)" ]; then
git branch -D $k
git push origin --delete $k
fi
done
@willurd
willurd / web-servers.md
Last active July 4, 2024 14:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real