This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/systemd/system/test.service | |
[Unit] | |
Description=Test Systemd Service | |
[Service] | |
ExecStartPre=/usr/bin/echo -e "\033[0;33m Pre start \033[0m" | |
ExecStart=/usr/bin/sleep 10 | |
ExecStartPost=/usr/bin/echo -e "\033[0;33m Post start \033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#choose device | |
pvcreate /dev/sdb | |
#choose vg name or number (vg01) | |
vgcreate vg01 /dev/sdb | |
#volume group show | |
vgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find / -user root -perm -4000 -print 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name '*.sh' -maxdepth 1 -type f -exec cp {} ./backups/ \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '/role/{gsub("<br>",""); print$3}' | |
grep sed, print column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ $input=~ [A-Za-z0-9-]+\/[A-Za-z0-9-]+\:[A-Za-z0-9-]+ ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> | |
<SOAP-ENV:Body> | |
<ns1:LatLonListZipCodeResponse xmlns:ns1="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl"> | |
<listLatLonOut xsi:type="xsd:string"><?xml version='1.0'?><dwml version='1.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd'><latLonList>32.9612,-96.8372</latLonList></dwml></listLatLonOut> | |
</ns1:LatLonListZipCodeResponse> | |
</SOAP-ENV:Body> | |
</SOAP-ENV:Envelope> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "soapAction: \"https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListCityNames\"" -H "Content-Type: text/xml;charset=UTF-8" --data @test.xml https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios-https-proxy-fix'); | |
/** | |
* @author Caleb Lemoine | |
* @param {object} opts easy-soap-request options | |
* @param {string} opts.url endpoint URL | |
* @param {object} opts.headers HTTP headers, can be string or object | |
* @param {string} opts.xml SOAP envelope, can be read from file or passed as string | |
* @param {int} opts.timeout Milliseconds before timing out request | |
* @param {object} opts.proxy Object with proxy configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const soapRequest = require('easy-soap-request'); | |
const fs = require('fs'); | |
// example data | |
const url = 'https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php'; | |
const sampleHeaders = { | |
'user-agent': 'sampleTest', | |
'Content-Type': 'text/xml;charset=UTF-8', | |
'soapAction': 'https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode', | |
}; |
OlderNewer