Skip to content

Instantly share code, notes, and snippets.

View uurtech's full-sized avatar
✈️
Works

Ugur KAZDAL uurtech

✈️
Works
View GitHub Profile
@uurtech
uurtech / run.sh
Created May 17, 2020 11:47
Bash + Curl download files for number of range
set -B # enable brace expansion
for i in {1..38}; do
curl "https://www.dr.com.tr/sitemaps/product/product_${i}.xml" -o "product_${i}.xml"
done
@uurtech
uurtech / main.go
Created May 28, 2020 14:49
Golang Json Parse Empty Interface
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@uurtech
uurtech / main.go
Created May 28, 2020 14:50
Golang Json Parse with Struct
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@uurtech
uurtech / job.yaml
Created June 5, 2020 09:31
Kubernetes cronjob
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: xml-checker
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
@uurtech
uurtech / bash.sh
Created June 16, 2020 12:26
Forward port 80 to any port for users linux
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
@uurtech
uurtech / app.sh
Created December 21, 2020 13:16
search a content in files in linux bash
grep -rnw /path/to/target/ -e 'content-to-search'
@uurtech
uurtech / default.conf
Created May 3, 2021 19:12
nginx-docker-compose
server {
server_name _;
listen 80 default_server;
location / {
add_header Content-Type text/html;
return 200 'hello';
}
location /hello {
@uurtech
uurtech / Dockerfile
Last active April 19, 2022 08:34
Mysql Cli Dockerfile
FROM ubuntu
RUN apt update
RUN apt install software-properties-common -y
RUN apt-get install mysql-client -y
ENTRYPOINT [ "tail", "-f", "/dev/null" ]
@uurtech
uurtech / Dockerfile
Created May 9, 2022 18:25
Redis-cli-Dockerfile
FROM ubuntu
RUN apt update
RUN apt install software-properties-common -y
RUN apt install -y redis-tools
ENTRYPOINT [ "tail", "-f", "/dev/null" ]
@uurtech
uurtech / kubernetes.sh
Created June 24, 2022 06:39
Delete all Kubernetes resources in all namespaces
kubens | while read line ; do
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found --namespace $line
done