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
def responder(objectId, objectType): | |
''' | |
Run responder via API | |
''' | |
post_data = { | |
'objectId': objectId, | |
'objectType': objectType, | |
'responderId': cfg['responderIds']['<responder_name>'] | |
} | |
response = requests.post( |
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
{% if salt['pkg.version']('ntp') %} | |
/etc/ntp.conf: | |
file.managed: | |
- source: salt://file/on/master.conf | |
{% elif salt['pkg.version']('chrony') %} | |
/etc/chrony.conf: | |
file.managed: | |
- source: salt://file/on/master.conf | |
{% else %} | |
chrony: |
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
{% set int = salt['pillar.get']('test:int') %} | |
{{ salt['grains.get']('ip4_interfaces:' ~ int, grains.ip4_interfaces.ens160) | first }} |
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/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap caskroom/cask | |
brew cask install atom | |
brew cask install caffeine | |
brew cask install keeweb | |
brew cask install mattermost | |
brew cask install skype | |
brew cask install spotify | |
brew cask install sublime-text | |
brew cask install thunderbird |
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
sc.exe sdset $ServiceName D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)" |
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
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
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
def lõimede_pikkus(vaiba_lõpp_pikkus, lõimede_arv): | |
return (round(lõimede_arv * (vaiba_lõpp_pikkus * 1.2 + 0.5), 2)) | |
failinimi = input("Sisestage failinimi: ") | |
lõimede_arv1 = int(input("Sisestage 5-meetriste ja pikemate vaipade lõimede arv: ")) | |
lõimede_arv2 = int(input("Sisestage lühemate vaipade lõimede arv: ")) | |
vaiba_lõpp_pikkus = [] | |
fail = open(failinimi, encoding="UTF-8") |
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
# Passing in this: | |
return influxdb.InfluxDBClient(host=host, | |
port=port, | |
username=user, | |
password=password, | |
**client_args) | |
# Gives me this: | |
# Passed invalid arguments: __init__() got an unexpected keyword argument '__pub_pid'. |
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
name: | |
salt.function: | |
- name: file.write | |
- tgt: 'salt.master.here' |
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
restart_minion: | |
cmd.run: | |
- name: | | |
exec 0>&- | |
exec 1>&- | |
exec 2>&- | |
nohup /bin/sh -c 'sleep 10 && salt-call --local service.restart salt-minion' & | |
- order: last |
NewerOlder