This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Kullanicinin IP adresini aliyoruz | |
$remoteaddr = $_SERVER['REMOTE_ADDR']; | |
// Sonra ip-api sitesinden bilgi elde ediyoruz (Ulke kod, Ulke, Bolge adi, eyalet,sehir gibi seyler...) | |
$ipadress = json_decode(file_get_contents("http://ip-api.com/json/$remoteaddr")); | |
$countryCode = strtolower($ipadress->countryCode); // Ulke kodu (Buyuk harfler ile geldigi icin kuculttum (gerek var mi hic bir fikrim yok.)) | |
$country = $ipadress->country; // Ulke adi (Ingilizce olarak geliyor. (Turkey, United Stades gibi..)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@ranc:~$ docker logs \ | |
> --timestamps \ | |
> $(docker ps | grep -E "rancher/rancher:|rancher/rancher " | awk '{ print $1 }') | |
2019-03-14T15:05:59.192796794Z 2019/03/14 15:05:59 [INFO] Rancher version v2.1.7 is starting | |
2019-03-14T15:05:59.192841549Z 2019/03/14 15:05:59 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:auto Embedded:false KubeConfig: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false NoCACerts:false ListenConfig:<nil> AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0} | |
2019-03-14T15:05:59.192847794Z 2019/03/14 15:05:59 [INFO] Listening on /tmp/log.sock | |
2019-03-14T15:05:59.195793842Z 2019/03/14 15:05:59 [INFO] Running etcd --peer-client-cert-auth --client-cert-auth --listen-peer-urls=https://0.0.0.0:2380 --key-file=/etc/kubernetes/ssl/kube-etcd-127-0-0-1-key.pem --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-127-0-0-1.pem --peer-key-file=/etc/kubernetes/ssl/kube-etcd-127-0-0-1-key.pem --election-timeout=500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.hostname = "ranc.local" | |
config.vm.network :private_network, ip: "85.75.96.12" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
config.vm.network :forwarded_port, guest: 5432, host: 5432 | |
config.vm.network :forwarded_port, guest: 8443, host: 8443 | |
config.vm.provider "virtualbox" do |vb| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AD SOYAD KONTROLÜ | |
/** | |
* @return {boolean} | |
*/ | |
function Kontrol($adsoyad) { | |
const regex = /^[a-zA-ZöçşığüÖÇŞİĞÜ,]+(\s?[a-zA-ZöçşığüÖÇŞİĞÜ, ])*$/; // Türkçe desteği de eklendi | |
const regex1 = /[qwrtypsdfghjklzxcvbnmQWRTYPSDFGHJKLZCXVBNMÇ]{4,}/; | |
const regex2 = /[euıiüaöEUIAO]{3,}/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT='%{$fg_bold[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} ➜ % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias c='clear' | |
alias h='cd ~' | |
alias zcr='code ~/.zshrc' | |
alias code='code-insiders' | |
alias hm='code ~/Homestead/Homestead.yaml' | |
alias vh='vagrant halt' | |
alias vr='vagrant reload --provision' | |
alias vsh='vagrant ssh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: whoareyou-deployment | |
namespace: default | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: whoareyou |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
web: | |
image: gitea/gitea:1.7.1 | |
volumes: | |
- ./data:/data | |
ports: | |
- "3000:3000" | |
- "2022:22" | |
depends_on: |