Skip to content

Instantly share code, notes, and snippets.

View dhiren051's full-sized avatar
🎯
Focusing

DM dhiren051

🎯
Focusing
  • Cypress, CA
View GitHub Profile
https://medium.com/@bretcameron/7-essential-features-of-visual-studio-code-for-web-developers-be77e235bf62
https://realpython.com/python-development-visual-studio-code/
https://www.quora.com/What-are-the-best-Visual-Studio-Code-extensions-for-python
https://www.codejuggle.dj/mac-os-x-development-setup-guide/
https://docs.python-guide.org/starting/install3/osx/
https://docs.python-guide.org/dev/virtualenvs/#virtualenvironments-ref
https://wsvincent.com/install-python3-mac/
https://realpython.com/intro-to-pyenv/
https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos
@dhiren051
dhiren051 / node_exporter.default
Created September 26, 2019 20:52 — forked from eloo/node_exporter.default
Init.d script for prometheus node exporter
# Set the command-line arguments to pass to the server.
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# -collector.ipvs.procfs="/proc": procfs mountpoint.
# -collector.megacli.command="megacli": Command to run megacli.
# -collector.ntp.server="": NTP server to use for ntp collector.
# -collector.textfile.directory="": Directory to read text files with metrics from.
@dhiren051
dhiren051 / Kitchen-CheetSheet.md
Created August 29, 2019 20:35 — forked from arttuladhar/Kitchen-CheetSheet.md
Chef and Knife Commands CheatSheet

Kitchen Commands

kitchen list
kitchen create
kitchen destroy
kitchen login <InstanceName>
@dhiren051
dhiren051 / knife cheat
Created August 21, 2019 20:52 — forked from ipedrazas/knife cheat
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@dhiren051
dhiren051 / readme.md
Created August 21, 2019 19:11 — forked from maxivak/readme.md
Chef. How to run scripts (recipes)

Run Chef scripts locally

There are several options to run recipes:

  • using chef-client with -z option
  • using chef-apply
  • using chef-solo

Before running Chef recipes on the machine, it should be prepared:

@dhiren051
dhiren051 / ambassador_envoy_prometheus_grafana_dashboard.json
Created August 16, 2019 23:42 — forked from psalaberria002/ambassador_envoy_prometheus_grafana_dashboard.json
Grafana dashboard for Ambassador Envoy metrics per destination cluster
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
#!/bin/bash
alerts='[
{
"labels": {
"alertname": "instance_down",
"instance": "example1"
},
"annotations": {
"info": "The instance example1 is down",
@dhiren051
dhiren051 / alert.sh
Created August 15, 2019 19:31 — forked from cherti/alert.sh
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",