Skip to content

Instantly share code, notes, and snippets.

Pillar
file
users/dev_accounts.sls
company_dev_accounts:
user.1:
username: user.1
fullname: user 1
shell: /bin/bash
home: /home/user.1
uid: 10000
{
"AlarmName": "breitling_Breitling-Daylight_UnHealthyHostCount Alarm",
"AlarmDescription": "Breitling-Daylight_UnHealthyHostCount Alarm",
"AWSAccountId": "271794010589",
"NewStateValue": "ALARM",
"NewStateReason": "Threshold Crossed: 1 datapoint (0.0) was not greater than the threshold (0.0).",
"StateChangeTime": "2016-07-06T15:36:41.406+0000",
"Region": "US East - N. Virginia",
"OldStateValue": "OK",
"Trigger": {
#FILE: hostname.list
hostname.domain.com
hostname2.domain.com
hostname3.domain.com
# shell script
for a in `cat hostname hostname.list` do ssh user@$a "yum remove datadog"`; done
$users = ['david.gonzales', 'akhter.ali', 'sierah.nguon']
$users.each |String $users| {
user { $users:
ensure => 'present',
gid => '500',
password_hash => '!!',
uid => '500',
shell => '/bin/bash'}
}
```
project_root\
\packages
\tests
```
```
project_root\
\packages
\tests
```
```
project_root\
\packages
__init__.py
\tests
__init__.py
```
import random
import time
z = range(0, 99)
while True:
z1 = random.choice(z)
i = random.sample(range(0,99), 4)
q = i[0]
w = i[1]
e = i[2]
time.sleep(1)
this is a gist :)
@moali87
moali87 / gist:8192a5a6f9af9a4ab7e2a04016d8f7df
Last active May 22, 2017 15:11
sample website and port check
#!/usr/bin/env python3
import requests
import socket
def get_page_code():
test = requests.get('http://www.google.com')
return test.status_code