Skip to content

Instantly share code, notes, and snippets.

@TheYkk
TheYkk / config.json
Created June 7, 2019 13:13
Tashigi icin
{
"search.useIgnoreFiles": false,
"editor.mouseWheelZoom": true,
"terminal.integrated.fontFamily": "",
"extensions.ignoreRecommendations": false,
"local-history.daysLimit": 0,
"local-history.path": "D:\\Program\\Backup",
"workbench.iconTheme": "material-icon-theme",
"editor.multiCursorModifier": "ctrlCmd",
version: '2'
services:
web:
image: gitea/gitea:1.7.1
volumes:
- ./data:/data
ports:
- "3000:3000"
- "2022:22"
depends_on:
#!/bin/bash
if [[ $DEBUG == "true" ]]; then
set -x
fi
# Check if FQDN is given
if [ -z "$1" ]; then
echo "Usage: $0 rancher.yourdomain.com"
exit 1
fi
@TheYkk
TheYkk / cleanup.sh
Created May 16, 2019 18:17 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
#!/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
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
@TheYkk
TheYkk / kubia.yaml
Created May 3, 2019 22:44 — forked from DevInTheTrenches/kubia.yaml
Simple Hands-on Introduction to K3S - Lightweight Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: whoareyou-deployment
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: whoareyou
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]%})"
@TheYkk
TheYkk / .zshrc
Last active April 25, 2019 17:22
# 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
@TheYkk
TheYkk / alias
Last active April 25, 2019 17:20
alias
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'
@TheYkk
TheYkk / adsoyad.js
Created March 21, 2019 06:33
Javascript ad soyad kontrolu
// 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,}/;