Skip to content

Instantly share code, notes, and snippets.

@junaid18183
junaid18183 / debloat.sh
Last active April 7, 2023 08:10
Debloat Xiomi
adb devices -l
List of devices attached
ZD2228KRXB device usb:339738624X product:hawao_g model:moto_g42 device:hawao transport_id:1
adb -d shell
pm list packages | grep google
com.google.android.youtube
pm uninstall -k --user 0 com.google.android.apps.tachyon # Google Duo
@junaid18183
junaid18183 / dashing.tf
Created September 28, 2016 11:41
This is the terraform template to use with docker provider, covers ports and volumes + tested on boo2docker + make sure you copy the certs to cert path
# Configure the Docker provider
provider "docker" {
host = "tcp://192.168.99.100:2376/"
cert_path = "/vagrant/docker-certs"
}
# Create a container
resource "docker_container" "dashing" {
image = "${docker_image.dashing.latest}"
name = "dashing"
@junaid18183
junaid18183 / userdata.sh
Created October 12, 2022 08:25 — forked from dkeightley/userdata.sh
RKE2 AWS cloud controller manager
#!/bin/sh
PUBLIC_IP=$(curl ifconfig.io)
# export INSTALL_RKE2_VERSION="v1.20.5+rke2r1"
curl -sfL https://get.rke2.io | sh -
provider_id="$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)/$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
#!/usr/bin/python
# +----------------------------------------------------------------------+
# | |
# | _ _ __ __ |
# | | | | | | \/ | |
# | | |_ _ _ __ ___ __| | | \ / | ___ _ __ ___ ___ _ __ |
# | _ | | | | | '_ \ / _ \/ _` | | |\/| |/ _ \ '_ ` _ \ / _ \| '_ \ |
# | | |__| | |_| | | | | __/ (_| | | | | | __/ | | | | | (_) | | | | |
# | \____/ \__,_|_| |_|\___|\__,_| |_| |_|\___|_| |_| |_|\___/|_| |_| |
# | |
provider "aws" {
region = "us-east-2"
}
terraform {
required_version = "1.0.7"
required_providers {
aws = {
source = "hashicorp/aws"
@junaid18183
junaid18183 / haproxy_socat
Last active November 4, 2020 09:29
Haproxy stats with Socat
#Source - http://www.haproxy.org/download/1.5/doc/configuration.txt
# Section - 9.2. Unix Socket commands
#show stat [<iid> <type> <sid>]
# Dump statistics in the CSV format. By passing <id>, <type> and <sid>, it is
# possible to dump only selected items :
# - <iid> is a proxy ID, -1 to dump everything
# - <type> selects the type of dumpable objects : 1 for frontends, 2 for
# backends, 4 for servers, -1 for everything. These values can be ORed,
# for example:
@junaid18183
junaid18183 / vault_ssh_otp_demo.sh
Last active May 10, 2020 11:11
vault_ssh_otp_demo
#!/bin/bash
download_vault(){
wget https://releases.hashicorp.com/vault/0.9.1/vault_0.9.1_linux_amd64.zip?_ga=2.165144251.566422628.1516357846-2059600638.1516357846 -O vault_0.9.1_linux_amd64.zip
apt-get install -y zip
unzip vault_0.9.1_linux_amd64.zip
mv vault /usr/local/bin/
rm vault_0.9.1_linux_amd64.zip
}
########################
download_ssh_helper(){
@junaid18183
junaid18183 / keybase.md
Created April 1, 2020 05:38
keybase.md

Keybase proof

I hereby claim:

  • I am junaid18183 on github.
  • I am junaid18183 (https://keybase.io/junaid18183) on keybase.
  • I have a public key whose fingerprint is 125A B028 4F43 4538 0570 9A8A B7C1 868E 3994 DA9E

To claim this, I am signing this object:

@junaid18183
junaid18183 / Readme
Last active August 22, 2019 16:25
Dashing Widget For Hadoop DFS Stats
This widget creats the dashing dashboard for Hadoop DFS stats.
There is Job which parses the hadoop DFS status page and provides the below widget_event_id's
#Configured_Capacity
#DFS_Used
#Non_DFS_Used
#DFS_Remaining
#DFS_Used%
#DFS_Remaining%
#Block_Pool_Used
@junaid18183
junaid18183 / sssd_on_redhat.sh
Last active November 28, 2018 13:29
sssd_on_redhat
#https://mapr.com/support/s/article/How-to-configure-LDAP-client-by-using-SSSD-for-authentication-on-CentOS?language=en_US
#https://gist.github.com/mazgi/3dbfe99fb2b3e8d1e50b
#http://www.ateam-oracle.com/part-3-of-4-sssd-linux-authentication-implementation-step-by-step-guideline/
yum install openldap openldap-clients sssd sssd-client
cp /etc/openldap/ldap.conf /etc/openldap/ldap.conf.orig
> /etc/openldap/ldap.conf
cat << EOF > /etc/openldap/ldap.conf
BASE dc=example,dc=com