Skip to content

Instantly share code, notes, and snippets.

View ahmetozer's full-sized avatar
🖐️
Hi , thank you for visiting.

Ahmet ÖZER ahmetozer

🖐️
Hi , thank you for visiting.
View GitHub Profile
@ahmetozer
ahmetozer / centos-8-kubernates-install.sh
Created September 4, 2020 21:27
centos 8 kubernates install
#!/bin/sh
set -e
if [[ $EUID -ne 0 ]]; then
echo "$0 must be run as root"
exit 1
fi
dnf install -y libselinux-utils # setenforce
setenforce 0
@ahmetozer
ahmetozer / get_ini_value.go
Created August 28, 2020 12:08
Golang String ini get value
package main
import (
"fmt"
"strings"
)
func getINI(iniText string, key string) string {
keyLoc := strings.Index(iniText, key)
@ahmetozer
ahmetozer / testgist.json
Created August 24, 2020 17:06
testgist
{
"origins" : [
"ahmetozer.org",
"apicors.ahmetozer.org"
],
"hosts" : [
"hub.docker.com"
]
}
@ahmetozer
ahmetozer / docker_repositories_to_html_table.html
Created August 24, 2020 01:32
Embed Docker repositories to your page.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<table>
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Description</th>
<th scope="col">Last Update</th>
<th scope="col">Pull Count</th>
</tr>
@ahmetozer
ahmetozer / update-time-cloudflare.sh
Created August 8, 2020 21:54
Update Linux Date Time with curl and Cloudflare
#!/bin/bash
date
date -s"@$(curl ahmetozer.org/cdn-cgi/tracert -s | grep ts= | cut -d"=" -f2 | cut -d"." -f1)"
date
@ahmetozer
ahmetozer / sshd_config
Last active July 14, 2020 21:03
SSH log command
# Do not forget add these lines to /etc/ssh/sshd_config
Match User test
ForceCommand "/bin/sshlogexec.sh"
@ahmetozer
ahmetozer / json-to-list.html
Created June 15, 2020 23:12
Json to bootsrap list example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Json to bootstrap List</title>
<!-- jquery -->
@ahmetozer
ahmetozer / 6to4tunnel.cfg
Created June 5, 2020 11:50
Linux ifupdown 6to4 configuration
#You can get 6to4 adress with below command
#printf "2002:%02x%02x:%02x%02x::1" `curl https://ahmetozer.org/cdn-cgi/tracert -4 -s |grep ip | cut -d"=" -f 2 | tr "." " "`
auto 6to4
iface 6to4 inet6 v4tunnel
address 2002:0808:0808::1 #Do not forget to change own ip in all config.
netmask 48 #
endpoint 192.88.99.1 # Anycast Tunnel Gateway
#gateway 2002:0808:0808::
ttl 255
Usage...
Vcxsrv [:<display>] [option]
:display-number
Vcxsrv runs as the given display-number, which defaults to 0.
To run multiple instances, use unique display-numbers.
-silent-dup-error Do not show fatal exit error mesage box
-a # default pointer acceleration (factor)
-ac disable access control restrictions
@ahmetozer
ahmetozer / Logitech.key.md
Created May 25, 2020 18:07
Logitech K370s/K375s Keys

Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x46d product 0x4061 version 0x111 Input device name: "Logitech K370s/K375s" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 1 (KEY_ESC) Event code 2 (KEY_1) Event code 3 (KEY_2) Event code 4 (KEY_3)