Skip to content

Instantly share code, notes, and snippets.

View aolwas's full-sized avatar

Maxime Cottret aolwas

View GitHub Profile
@aolwas
aolwas / README.md
Last active October 28, 2022 07:37 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@aolwas
aolwas / slack_webhook_post.py
Created November 6, 2019 08:55 — forked from devStepsize/slack_webhook_post.py
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests
@aolwas
aolwas / version.py
Last active October 28, 2019 15:18 — forked from mina86/version.py
Extract a setuptools version from the git repository's tags.
# -*- coding: utf-8 -*-
"""Calculates the current version number.
Uses output of “git describe --long --tags --always --dirty='-dev-$(date +%s)'”
interpreted as <version>-<commits>-<sha>-<dirty>
if commits != 0 and not dirty, return version else return full output.
If "git describe" fails (when install via package, copied src, etc), version is
#!/bin/bash -e
ln -s /usr/lib/x86_64-linux-gnu/amdgpu-pro .
ln -s /etc/OpenCL .
tar -czvf libs.tar.gz amdgpu-pro/*
tar -czvf conf.tar.gz OpenCL/*
cat > .dockerignore << EOF
OpenCL
@aolwas
aolwas / pedantically_commented_playbook.yml
Created November 30, 2015 11:01 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@aolwas
aolwas / gist:1d52c438296d7a473212
Created November 18, 2015 16:26 — forked from bsmartt13/gist:efa02c40ea12c09d9c3a
OTX IP Reputation download links (updated hourly)
https://reputation.alienvault.com/reputation.generic.gz
https://reputation.alienvault.com/reputation.generic
https://reputation.alienvault.com/reputation.data
https://reputation.alienvault.com/reputation.snort.gz
https://reputation.alienvault.com/reputation.snort
https://reputation.alienvault.com/reputation.iptables.gz
https://reputation.alienvault.com/reputation.iptables
https://reputation.alienvault.com/reputation.squid.gz
https://reputation.alienvault.com/reputation.squid
https://reputation.alienvault.com/reputation.unix.gz
@aolwas
aolwas / start-stop-daemon-template
Created October 25, 2015 13:56 — forked from bcap/start-stop-daemon-template
Template file for creating linux services out of executables using the start-stop-daemon
#!/bin/bash
### BEGIN INIT INFO
# Provides: <service name>
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <service description>
### END INIT INFO