Skip to content

Instantly share code, notes, and snippets.

🖤
Let's make the world happy ...

Arash Hatami hatamiarash7

🖤
Let's make the world happy ...
View GitHub Profile
@hatamiarash7
hatamiarash7 / keys
Last active Jul 15, 2020
My Public keys
View keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/tdJNzi8sKDh3ehcuJF8QdIpWU934ykwN2H45eciKqp9d0Uaj8HnJDa4NP+cYDNA4OM7HgG59NbjBHlyW0MLcemSkCalY+G1sqmakiYyyzmPPuiwrKDiaRoP9eARdb5uwYXy9FP0GgC9Qrz59ZW55QkH1BxRgSjiMt7qG+6eju46p7y2hUTBzlFHzruY/15FhI2sGfTkikT3p7NP1HmvUxBJd9yi0UQy2CUakBojGw0y6R2Mk1TBy+gaIDqTPd/rQCE8ktn4lePMtdA0NK3jB9rMfy1lmsAnT+O2e7514nIk8VfaS/naDXJa9QzX3FYUfGR80fnKE1vyiajPEBm9nXiq1k+mb2scTcc3If2s7n0+tlg+qDXH6MoRbV5jeIwttGNmz9lAQ2O3VTpAQQuKnkGLOvDAa3v577SpEXXwUwy6WYjODxCDAbrjSXcvQJOiK6OIzXMkCGe3faVoTHlOFnYxHtaDTEGWOjwpZFkgm9v/HcIt+SgVyHAtfy3U2J30= root@Arash-WS
View 📊 Weekly development breakdown
YAML 5 hrs 8 mins ██████████▌░░░░░░░░░░ 50.0%
Makefile 1 hr 16 mins ██▌░░░░░░░░░░░░░░░░░░ 12.5%
Python 50 mins █▋░░░░░░░░░░░░░░░░░░░ 8.2%
Markdown 46 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5%
Text 20 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.4%
@hatamiarash7
hatamiarash7 / PC
Created Mar 30, 2020
My SSH Public keys
View PC
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCovveiF3Asq+tecDjJ+/JaDl6pSbe+eAfQ59umPBbvmOvpy91vGJIxB4iQSPEJeMpi1iW4+SA/rLcZg5oz0wBX/PffwLMAeVXgt/JM8SV4bwdQEgCXn2fTXPpTfpU5UtN4Bdirh3Mn7FvyzZjzqtI+VvVT6KV/Cxc11OBPQPrzXYzjzk+oBhUmf6IYHc89JqzZlLjNXM40dmSvdmMbGRZd8HjwD0hqAm6gpAgMkQARg5Fv281J7J6Xh6SPbCYBggNYJm5CJFicZBToHxFFv/kTGCNdSaSrINonNbUWObdhayHK6n+FeLw2eKAxBPJAPjxJ91ttekUkzuIlMU+8sHtGyo+Xba/1LYrsjjPIpifyBBn+E5GB6toeK8eVHMulQa9k6Wu61gNQ4pDg1u7+PHCF/gE+dLe1+UZsNGTfSB0ZqoCwFwUd4wb4Shk9zust99rTbXLHLydlIdRaj9X8I/ebYcWR7cuu/fPWCH7xVV10wamzdnfHyi7Sc8vZb5OyXiemwOsfohQA+Bif0oGOAemynZXrJMJpSv0o5Vn8xfBlaUraEvX8bBje8x4CX7gZOrUlma1KyVsNi5hrQN4pu86H0Bz2Puf2EYDoOEC31FuHfx7remSxn9bt8Wfwh8LzzvzQbGhmXqYzK6/HGxXIyB3TzXNFW+ZUEp6ARFpfUuKWMQ== info@arash-hatami.ir
@hatamiarash7
hatamiarash7 / dashboard.json
Created Mar 29, 2020
Minio dashboard for Grafana - Updated for minio version RELEASE.2020-03-19T21-49-00Z
View dashboard.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@hatamiarash7
hatamiarash7 / daemon.yml
Created Mar 11, 2020
Kubernetes disable transparent huge pages
View daemon.yml
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: kube-system
name: sysctl
spec:
selector:
matchLabels:
app: sysctl
template:
@hatamiarash7
hatamiarash7 / authentication.yml
Created Feb 22, 2020
Kubernetes Dashboard authentication method
View authentication.yml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@hatamiarash7
hatamiarash7 / DNS Switcher.md
Last active Feb 2, 2020
DNS switching script for Ubuntu server
View DNS Switcher.md

Just set your configuration path. Examples :

  • /etc/netplan/50-cloud-init.yaml
  • /etc/resolv.conf
@hatamiarash7
hatamiarash7 / command.sh
Created Jan 28, 2020
Run Portainer agent without docker swarm
View command.sh
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
@hatamiarash7
hatamiarash7 / version.py
Created Jan 16, 2020
Python pip - check available versions for specific package
View version.py
import json
import sys
from urllib import request
from pkg_resources import parse_version
def versions(pkg_name):
url = f'https://pypi.python.org/pypi/{pkg_name}/json'
releases = json.loads(request.urlopen(url).read())['releases']
return sorted(releases, key=parse_version, reverse=True)
@hatamiarash7
hatamiarash7 / test.py
Created Jan 16, 2020
Test Tensorflow GPU Availability
View test.py
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
import tensorflow_datasets as tfds
version = tf.__version__
executing_eagerly = tf.executing_eagerly()
You can’t perform that action at this time.