Skip to content

Instantly share code, notes, and snippets.

View Vortexdude's full-sized avatar
:octocat:
working...

Nitin Namdev Vortexdude

:octocat:
working...
  • Banglore
  • 22:51 (UTC -04:00)
View GitHub Profile
@Vortexdude
Vortexdude / pre-request-script.js
Created August 4, 2023 18:25
set variable from postman request using pre-request-script
pm.sendRequest({
url: "http://127.0.0.1:5000/login",
method: 'POST',
header: {
'accept': 'application/json',
'Content-Type': 'application/json',
'timeout': '3000'
},
body: {
mode: 'raw',
Unit]
Description=Azure DevOps Agent
After=network.target
[Service]
Type=simple
User=<user>
WorkingDirectory=/home/<user>/<agent_folder>
ExecStart=/home/<user>/<agent_folder>/run.sh
ExecStop=/home/<user>/<agent_folder>/bin/Agent.Listener remove --unattended
- hosts: localhost
tasks:
- name: run the playbook as hello world
debug:
msg: "Hello World"
import requests, json, time
# . Created by - Nitin Namdev
# . Aim - to send and recieve message using telegram
# . impliment - use can use as the ansible module to send and recieve alerts of the server.
# . focus - will be impliment other telegram methods
# . Thank you for using
# . You can reach me at - itsmyidbro@gmail.com
#!/bin/bash
export MAILFROM="noreply@domain.com"
export MAILTO="nitin.namdev@domain.com"
export SUBJECT="Test PDF for Email"
export ATTACH="You_file_with_no_spaces.pdf"
export MAILPART=`uuidgen` ## Generates Unique ID
export MAILPART_BODY=`uuidgen` ## Generates Unique ID
(
#!/usr/bin/python
# Copyright: (c) 2018, Terry Jones <terry.jones@example.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
---
module: my_test
- name: Ansible Playbook to Install and Setup Apache on Ubuntu
hosts: myservers
become: yes
tasks:
- name: Install latest version of Apache
apt: name=apache2 update_cache=yes state=latest
- name: Create document root for domain configured in host variable
file:
path: "/var/www/{{ http_host }}"