Kong Functions (Pre-Plugins)

lets you dynamically run Lua code from Kong, before other plugins in each phase.

for eg. removing the header if it is blank.

local k_request = kong.request.get_header("Content-Type")

if k_request and (k_request == "application/json") then
  local check_head = kong.request.get_raw_body()
  if (not check_head) or (check_head == "") then
    kong.service.request.clear_header("Content-Type")
  end
end

kill stuck Jenkins job from script console

Get full jenkins job name :

  Jenkins.instance.getAllItems(AbstractItem.class).each {
    println(it.fullName)
  };

Kill: Jenkins job which is stuck

Jenkins.instance
.getItemByFullName(“Tenerity-Platform/BizOps/apg-chargeback”)
.getBranch(“develop”)
.getBuildByNumber(716)
.finish(hudson.model.Result.ABORTED, new java.io.IOException(“Aborting build”));

kubectl custom query for CPU Memory Request Limit

kubectl custom query to get cpu , memory request and limit

kubectl get deploy -A -o=custom-columns='Namespace:.metadata.namespace,Name:.metadata.name,Request_CPU:.spec.template.spec.containers[0].resources.requests.cpu,Limit_CPU:.spec.template.spec.containers[0].resources.limits.cpu,Request_Memory:.spec.template.spec.containers[0].resources.requests.memory,Limit_Memory:.spec.template.spec.containers[0].resources.limits.memory' | sed 1d | tr -s '[:blank:]' ','

kubect replace variabe

deployments=$(kubectl get deploy | awk '{print $1}' | sed 1d)

for deploy in $deployments
do
    deploy_raw_yml=$(kubectl get deploy $deploy -o yaml)
    kubectl get deploy $deploy -o yaml > _tmp_store.yml
    value_to_be_replaced=$(kubectl get deploy $deploy -o yaml | grep -A 1 'NEW_RELIC_APP_NAME' | grep value | awk -F 'value: ' '{print $2}')
    echo "value_to_be_replaced: $value_to_be_replaced"
    if [[ $value_to_be_replaced == "" ]]; then
        echo "=====================$deploy no change =========================="
    else
        replaced_value=$(echo $value_to_be_replaced | sed 's/stage/perf/g')
         echo "replaced_value: $replaced_value"
        cat _tmp_store.yml| sed "s/$value_to_be_replaced/$replaced_value/g"  | kubectl apply -f -
        echo "=====================$deploy done =========================="
    fi
    
done

Halim seed Benefits

  • Halim seeds are rich in iron, which can assist in managing iron-deficiency anemia.
  • They contain phytoestrogen, resembling estrogen hormone, which regulates menstruation, potentially aiding in managing menstrual issues.
  • High fiber content in Halim seeds may alleviate constipation.
  • The presence of vitamins, minerals, and antioxidants in Halim seeds may benefit skin health.
  • Arachidonic and linoleic acids found in Halim seeds may enhance brain function.

Seeds health benefits – Eat Daily

SeedBenefits
Flax SeedsRich in omega-3 fatty acids, fiber, and lignans; supports heart health, aids digestion, may reduce cholesterol.
Chia SeedsHigh in fiber, protein, omega-3s, and antioxidants; promotes hydration, aids weight loss, supports bone health.
Sesame SeedsGood source of calcium, iron, magnesium, and healthy fats; supports bone health, may lower cholesterol levels.
Sunflower SeedsRich in vitamin E, magnesium, selenium, and protein; boosts heart health, supports skin health, aids in mood regulation.
Watermelon SeedsContains protein, healthy fats, vitamins, and minerals; supports heart health, aids digestion, may boost immunity.
Pumpkin SeedsHigh in antioxidants, magnesium, zinc, and fiber; supports prostate health, boosts immunity, help sleep.
Halim SeedsRich in Iron, protein, fiber, vitamins, and minerals; aids digestion, promotes weight loss, supports heart health.

Haldi(Turmeric) Milk – Lifes Hack

  • 250 ml of milk
  • 1-3 gram of haldi(Turmeric)
  • 1 gram ginger powder or Fresh ginger
  • 0.25 gram of dal chini(Cinnamon)
  • Suger or honey as per taste
  • Kaali mirch 0.1 gram
  • Anti-inflammatory Properties: Turmeric and cinnamon contain compounds like curcumin and cinnamaldehyde, respectively, which have anti-inflammatory effects, reducing inflammation in the body.
  • Antioxidant Powerhouse: Both turmeric and cinnamon are rich in antioxidants, which help neutralize harmful free radicals, protecting cells from damage and reducing the risk of chronic diseases.
  • Enhanced Absorption: Black pepper contains piperine, a compound that enhances the absorption of curcumin from turmeric and other nutrients, maximizing their health benefits.
  • Improved Digestion: Cinnamon and black pepper can aid digestion by stimulating enzyme activity, promoting gut health, and alleviating digestive discomfort.
  • Blood Sugar Regulation: Cinnamon has been shown to help regulate blood sugar levels by improving insulin sensitivity, which may be beneficial for managing diabetes or preventing insulin resistance.
  • Heart Health Support: Turmeric and cinnamon have been associated with heart-protective effects, such as lowering cholesterol levels, reducing blood pressure, and improving overall cardiovascular health.
  • Potential Cancer Prevention: Some studies suggest that the compounds found in turmeric, cinnamon, and black pepper may have anti-cancer properties, inhibiting the growth and spread of cancer cells, though more research is needed in this area.
  • improving sleep quality: cinnamon