Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
*beep boop* overworked !

Arash Hatami hatamiarash7

🤖
*beep boop* overworked !
View GitHub Profile
View List of ADB for Android
==> Install app
adb install Myapp.apk
adb -d install Myapp.apk // -d : directs command to the connected USB device
adb -e install Myapp.apk // -e : directs command to the running emulator
adb -s install Myapp.apk // -s : serial number
adb -p install Myapp.apk // -p : product name or path
----------------------------------------------------------------------------------------------------------
==> Uninstall app
View Keys - PGP
# Arash WS
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBF8uzd0BCADI4CqwpIoTK/jEZ4Z+YRIYPNYQa5FPuIn1q9rOV6B0pq8H2OCU
NzdhQhgg5OM/ZjbeBqsRymmkFP1Na4OCPc0DzqJpwP0BPx3AfM//+CJJK25ioOzL
UxI5nEVNNn/nhSvsdVFpi7J41GQlz+jnfbamEJI/2cgyxU2Php9BtOzgPIaARaYO
7kWA3kx5zubCPWdieTLM2/WL+T1wC5nI8Il0UByPrSbmcalaYGxrVqZJaYmtG8EN
M3BlXaNVGO+4ntHXQuBXKUmUPeUO9uFGwR3Z49C41v4WP04Go4y7WByi4JNujWl1
Q5br0XLGnLz3sP1ADuOmjHxVqa8AdHaGYjWFABEBAAG0MEFyYXNoIEhhdGFtaSAo
QXJhc2gtV1MpIDxoYXRhbWlhcmFzaDdAZ21haWwuY29tPokBTgQTAQoAOBYhBJsm
@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()
View keybase.md

Keybase proof

I hereby claim:

  • I am hatamiarash7 on github.
  • I am hatamiarash7 (https://keybase.io/hatamiarash7) on keybase.
  • I have a public key ASDWKhZmvYFMbdkxIFZZbAptNy8D5d66PzrNnvtkQ_iJSwo

To claim this, I am signing this object: