Skip to content

Instantly share code, notes, and snippets.

View avary's full-sized avatar

Abdulhafiz KAŞGARLI avary

View GitHub Profile
@avary
avary / websocketgames.go
Created June 23, 2023 14:52 — forked from tsilvers/websocketgames.go
Golang code to send binary image data to client through a websocket connection.
package main
import (
"flag"
"fmt"
"html/template"
"log"
"net/http"
"time"
@avary
avary / upload.go
Created June 23, 2023 14:50 — forked from tsilvers/upload.go
Upload files to a Go server using web sockets.
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"time"
{
"Name": "Elvis",
"Location": "Memphis"
}
@avary
avary / brew-list.sh
Created March 10, 2021 09:59 — forked from eguven/brew-list.sh
List all packages installed using Homebrew and their sizes
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal