Skip to content

Instantly share code, notes, and snippets.

View jffz's full-sized avatar

Geoffrey Bachelot jffz

View GitHub Profile
TASK [netdata : Installation pré-requis] ***************************************
skipping: [temp-lampion1] => (item=[u'autoconf', u'autoconf-archive', u'autogen', u'automake', u'curl', u'gcc', u'git', u'jq', u'libmnl-devel', u'libuuid-devel', u'make', u'pkgconfig', u'zlib-devel'])
NO MORE HOSTS LEFT *************************************************************
RUNNING HANDLER [services-config : restart nrpe] *******************************
RUNNING HANDLER [services-config : restart crond] ******************************
to retry, use: --limit @postinstall.retry
'use strict'
const express = require('express')
const bodyParser = require('body-parser')
const SrcdsLogParser = require('better-srcds-log-parser').SrcdsLogParser
// Create a new instance of express
const app = express()
const parser = SrcdsLogParser()
# Create list using a specific attribute value
## Original task
- name: "Set fact"
set_fact:
hdd_list: "{{ hdd_list|default([]) + [item.key] }}"
with_dict: "{{ ansible_facts.ansible_devices }}"
when: item.value.model == "Virtual disk"
## Output
"hdd_list": [
- name: "Replace pistoldm Files"
uri:
url: "https://{{ git.server }}/{{ git.project }}/raw/master/{{ item[1] }}/{{ item[0].path | regex_search('csgo/.*') | dirname }}/{{ to_update }}"
headers:
PRIVATE-TOKEN: "{{ git.token }}"
status_code: 200
dest: "{{ item[0].path }}"
when: "item[0] is defined and item[0].path is defined"
with_nested:
- "{{ files_to_update.results | map(attribute='files') | list }}"
from discord.ext import commands
import discord
def build_embed(ctx, **kwargs):
# Set default parameters
parameters = {
'author_avatar_url': ctx.author.avatar_url,
'author_name': ctx.author.name,
@jffz
jffz / embed.py
Last active August 8, 2018 19:17
from discord.ext import commands
import discord
import shlex
class Embed_Commands:
def __init__(self, bot):
self.bot = bot
@commands.command(name='embed', aliases=['embedtest','testembed','embd','embdtest','testembd'])
from discord.ext import commands
import discord
import os
import json
import aiohttp
import io
from PIL import Image
class Configs_Commands:
from discord.ext import commands
import discord
import youtube_dl
import asyncio
import logging
log = logging.getLogger(__name__)
# Suppress noise about console usage from errors
youtube_dl.utils.bug_reports_message = lambda: ''
from discord.ext import commands
import discord
import shlex
log = logging.getLogger(__name__)
class Embed_Commands:
def __init__(self, bot):
self.bot = bot
#!/bin/sh
# Get out of town if something errors
# set -e
# Get info on the monitors
HDMI1_STATUS=$(</sys/class/drm/card0/card0-HDMI-A-1/status )
HDMI2_STATUS=$(</sys/class/drm/card0/card0-HDMI-A-2/status )
DP1_STATUS=$(</sys/class/drm/card0/card0-DP-1/status )
DP2_STATUS=$(</sys/class/drm/card0/card0-DP-2/status )