Skip to content

Instantly share code, notes, and snippets.

import json
import traceback
from pyaoscx.session import Session
from pyaoscx.vlan import Vlan
from pyaoscx.mac import Mac
import urllib3
urllib3.disable_warnings()
@martbhell
martbhell / gpg_scan.py
Last active September 4, 2019 16:51 — forked from Disasm/gpg_scan.py
gpg_scan.py
#!/usr/bin/env python3
import os
import subprocess
import re
import glob
def main(dumps):
@martbhell
martbhell / phoronix-user-config-defaults.xml
Created October 22, 2018 10:24
phoronix-user-config-defaults.xml
<?xml version="1.0"?>
<!--Phoronix Test Suite v7.8.0-->
<?xml-stylesheet type="text/xsl" href="xsl/pts-user-config-viewer.xsl"?>
<PhoronixTestSuite>
<Options>
<OpenBenchmarking>
<AnonymousUsageReporting>TRUE</AnonymousUsageReporting>
<IndexCacheTTL>3</IndexCacheTTL>
<AlwaysUploadSystemLogs>FALSE</AlwaysUploadSystemLogs>
</OpenBenchmarking>
@martbhell
martbhell / test2.yml
Created April 12, 2018 11:21
ansible role users test playbook
---
- name: first add a few users that we later remove
hosts: testhost
gather_facts: False
vars:
- bootstrap_user: cloud-user
- adminusers:
- {name: admin6, state: 'present', uid: 5006, group: "{{admingroup}}", shell: "{{adminshell}}" }
- moreusers:
- {name: user4, state: 'present', uid: 6004 }
@martbhell
martbhell / easybuild_test_report_easyconfigs_pr6140_20181411-UTC-05-14-14.md
Created April 11, 2018 05:18
EasyBuild test report for easyconfigs PR #6140

Test report for easybuilders/easybuild-easyconfigs#6140

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in this PR)

Overview of tested easyconfigs (in order)

  • SUCCESS GPAW-1.3.0-foss-2017b-Python-3.6.3.eb

Time info

  • start: Wed, 11 Apr 2018 05:13:18 +0000 (UTC)
@martbhell
martbhell / test.txt
Created April 11, 2018 05:03
test123
This is just a test
---
- name: play
hosts: localhost
connection: local
vars:
user_list:
- user1
- root
@martbhell
martbhell / fgci-inventory.py
Created July 5, 2016 19:19
An inventory script that can show groups of groups
#!/usr/bin/python
import argparse
# for parsing the existing inventory
from ansible.inventory import Inventory
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
###args
parser = argparse.ArgumentParser(description='Different inventory script')
--- grub.cfg.org 2016-02-09 09:00:06.535863226 +0200
+++ grub.cfg 2016-02-09 09:08:11.716782060 +0200
@@ -57,7 +57,9 @@
fi
}
-terminal_output console
+serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
+terminal_input console serial
@martbhell
martbhell / facts.py.patch
Created December 29, 2015 06:02
facts.py and docker and travis-ci fix attempt
--- lib/ansible/module_utils/facts.py.org 2015-12-29 07:50:57.178262553 +0200
+++ lib/ansible/module_utils/facts.py 2015-12-29 07:58:39.263313953 +0200
@@ -558,6 +558,8 @@
if proc_1 in ['init', '/sbin/init', 'bash']:
# many systems return init, so this cannot be trusted, bash is from docker
proc_1 = None
+ self.facts['service_mgr'] = 'systemd'
+
# if not init/None it should be an identifiable or custom init, so we are done!