Skip to content

Instantly share code, notes, and snippets.

@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 24, 2024 06:51
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

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

GOOS Values

GOOS Out of the Box
aix
android
@jagroop
jagroop / blog.md
Last active December 13, 2017 17:51
Delete git history
#!/bin/bash

git checkout --orphan latest_branch # Checkout
git add -A # Add all the files
git commit -am "first commit" # Commit the changes
git branch -D master # Delete the branch
git branch -m master # Rename the current branch to master
git push -f origin master # Finally, force update your repository
@Golgarud
Golgarud / .gitattributes
Last active November 10, 2017 09:20
basic .gitattributes file
# INFO Source code #
####################
*.htm text filter=tabspace eol=lf
*.HTM text filter=tabspace eol=lf
*.html text filter=tabspace eol=lf
*.HTML text filter=tabspace eol=lf
*.php text filter=tabspace eol=lf
*.PHP text filter=tabspace eol=lf
*.css text filter=tabspace eol=lf
*.CSS text filter=tabspace eol=lf
@montanaflynn
montanaflynn / port.go
Created January 7, 2016 08:21
Port package which finds available ports or checks if a port is available
package port
import (
"net"
"strconv"
)
// New gets an available port
func New() (port int, err error) {
@tejainece
tejainece / cgo1.go
Last active March 27, 2024 04:29
Examples of calling C code from Golang
package main
//#include<stdio.h>
//void inC() {
// printf("I am in C code now!\n");
//}
import "C"
import "fmt"
func main() {
@AliMD
AliMD / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨