Skip to content

Instantly share code, notes, and snippets.

View yusufpapurcu's full-sized avatar
🫖
I'm a teapot

Yusuf Papurcu yusufpapurcu

🫖
I'm a teapot
View GitHub Profile
@yusufpapurcu
yusufpapurcu / main.go
Created April 2, 2021 18:17
Yarı mükemmel sayıları go ile bulma [ Turkish ]
package main
import "fmt"
func main() {
for i := 1; i < 100; i++ {
bölenler := bölenleriGetir(i)
if len(bölenler) < 3 || bölenler == nil {
continue
@yusufpapurcu
yusufpapurcu / convert.go
Created January 18, 2021 17:37
Go uint24 conversion
func uint24touint32(bytes []byte) uint32 {
return binary.BigEndian.Uint32(append([]byte{0x00}, bytes...))
}
// Just adding 0 to start and export as a uint32
// Easy and fast solution
app.SendMail("tryusuf97@gmail.com",
"A new user sign up",
"A new user sign up\nInformations about new user.\nEmail : "+userDTO.Email+"\nName:"+userDTO.Name)
package app
import (
"log"
"net/smtp"
)
func SendMail(to, sub, body string) {
from := "yusufturhanp@gmail.com"
pass := "cfavhrbebdhqtyvq"
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
)
func main() {
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello bro, This just test.")
}
{
"rfc460Timestamp": "2020-02-16T14:18:10.669Z",
"participants": [
{
"participantId": 3,
"level": 5,
"kills": 0,
"deaths": 1,
"assists": 0,
"totalGoldEarned": 1868,
@yusufpapurcu
yusufpapurcu / example.txt
Created March 5, 2020 21:46
Esports example
"esportsGameId": "103495781305002083",
"esportsMatchId": "103495781305002082",
"gameMetadata": {
"patchVersion": "10.3.307.1028",
"blueTeamMetadata": {
"esportsTeamId": "99566406064558732",
"participantMetadata": [
{
"participantId": 1,
"esportsPlayerId": "101422616412154641",