Blog

  • puppet-dcm4chee

    Visit original content creator repository
    https://github.com/evrimulgen/puppet-dcm4chee

  • article-meeseeks

    Article Meeseeks

    Article gatherer chatbot for Telegram.

    Chatbot for Telegram platform that pulls every link it receives and saves it in a Google Drive spreadsheet to build a knowledge database and share it with the rest of your team.

    The purpose of this chatbot is to take advantage of the already existing information sharing platforms in your team by gathering all the juicy articles and creating a knowledge repository from where you can choose to share to social media, internally or just save them for later.

    Look at me!

    Installation / Development setup

    Run this in a terminal:

    git clone https://github.com/joamadorrr/article-meeseeks.git
    
    cd article-meeseeks
    
    cp .env.example .env
    

    We just created a file with all the environment variables you will require:

    • BOT_TOKEN: Once you’ve created your bot, talk to the BotFather and ask him for your bot’s token
    • SHEETS_SCOPE: Unles you want to do something weird, leave the default
    • SPREADSHEET_ID: To get the id for your spreadsheet read this: https://developers.google.com/sheets/api/guides/concepts#spreadsheet_id
    • RANGE_NAME: Read the A1 notation part in the link above

    If you are setting up a development environment I highly recommend you use pipenv. Otherwise, you can install the requirements from the requirements.txt file.

    Pipenv

    Here we create an environment for the chatbot in python 3 and copy the last version of the development environment from the pipfile.lock

    pipenv --three
    
    pipenv shell
    
    pipenv install --ignore-pipfile
    

    After installing all the requirements, the Google Sheets API needs to be enabled.

    Google Sheets API

    Usage example

    When ran for the first time, the browser is opened to authenticate a google account. After the first sign in, the credentials are saved in the token.json file, so it won’t prompt the browser again.

    After deployment, basically just talk to it and send him links to cool articles you wanna share with your team. A really cool feature of Telegram bots is that you can make them join group conversations, so the Article Meeseeks can infiltrate different conversations and gather articles from those too.

    Release History

    • 0.1.0
      • The first proper release
      • Environment variables support added
    • 0.0.1
      • It works but a lot of things need to be enhanced before “official launch”

    Meta

    Jo Amador – @joamadorrr

    Distributed under the MIT license. See LICENSE for more information.

    https://github.com/joamadorrr

    Contributing

    1. Fork it (https://github.com/joamadorrr/article-meeseeks/fork)
    2. Create your feature branch (git checkout -b feature/fooBar)
    3. Commit your changes (git commit -am 'Add some fooBar')
    4. Push to the branch (git push origin feature/fooBar)
    5. Create a new Pull Request

    Visit original content creator repository
    https://github.com/amadxr/article-meeseeks

  • toaster-js

    Toaster-JS

    npm Dependencies BundleSize npm License

    The simple vanilla JavaScript toast pop-up notifications module, which is fully CSS-customizable. The solution which “just works”: add the module to your project and go further.

    Supported by all major browsers. Safe to use with ReactJS and other virtual-dom frameworks.

    Preview

    Screenshot

    Features

    • Fully CSS-customizable toast pop-ups for any design;
    • No dependencies and < 1kb code;
    • Configurable toasts type and timeout;
    • Fully configurable toast content (HTML, custom elements, etc).

    Installation & Usage

    Toaster-JS is primarily the uncompiled ES6 module. Install it with npm:

    npm install toaster-js

    Then, include it to your project:

    import { Toast } from "toaster-js"; // const { Toast } = require("toaster-js/umd.js");
    import "toaster-js/default.scss"; // Assuming CSS/SCSS loader is present
    // Import styles from SCSS: @import "../node_modules/toaster-js/default.scss";
    // Or just copy default styles to your project from node_modules/toaster-js/default.*css. 
    // Or draw your own styles! For instance, you can make toasts appear on the left by overwriting .toast { left: 0; right: auto; }
    
    // Simple toast
    new Toast("Welcome!");
    
    // Typed toast (just a matter of CSS) with timeout
    new Toast("There is a lot of toasts!", Toast.TYPE_ERROR, Toast.TIME_NORMAL);
    
    // Custom toast content example (you can also add something like close buttons, etc)
    let element = document.createElement("div");
    element.textContent = "You can pass any HTML elements to Toast. Clicking on this one deletes it!";
    let newToast = new Toast(element, Toast.TYPE_MESSAGE);
    element.addEventListener("click", () => newToast.delete()); // delete a toast on message click!

    You can set up additional options if you need. See the API section below for more details.

    import { configureToasts, deleteAllToasts } from "toaster-js";
    
    configureToasts({
        topOrigin: 0,
        deleteDelay: 300
    });
    deleteAllToasts(); // just deletes all toasts on the screen

    If you need to load ES5 (UMD) module, use the following:

    const { Toast } = require("toaster-js/umd.js");

    If you need to include the module with a script tag (for example, for demos), use this:

    <script type="text/javascript" src="https://unpkg.com/toaster-js/umd.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/toaster-js/default.css"/>

    API

    • toast = new Toast(content, type, timeout)
      • Toast.TIME_SHORT (2000 ms)
      • Toast.TIME_NORMAL (4000 ms)
      • Toast.TIME_LONG (8000 ms, default)
      • Toast.TYPE_INFO
      • Toast.TYPE_MESSAGE
      • Toast.TYPE_WARNING
      • Toast.TYPE_ERROR
      • Toast.TYPE_DONE
      • toast.delete() – Deletes this toast from the DOM.
    • configureToasts(options)
      • options.topOrigin = 0 – A number in pixels of toasts Y-axis origin (negative values move toasts up).
      • options.deleteDelay = 300 – A number representing delay in milliseconds. When toast is deleted, it stays in DOM for deleteDelay more milliseconds. Useful with CSS animations.
    • deleteAllToasts() – Deletes all toasts on the screen.
    Toast(content, type, timeout)

    Creates a new toast notification message on the screen. Pass a string content to specify the message text, type = Toast.TYPE_* to specify the type and timeout = Toast.TIME_* to specify the timeout. Timeout constants are the numbers of milliseconds for message to stay on screen. For example, new Toast("Baked!", Toast.TYPE_ERROR, 10000) message will stay on the screen for 10 seconds.

    • TIME_SHORT = 2 seconds
    • TIME_NORMAL = 4 seconds
    • TIME_LONG = 8 seconds
    • TYPE_INFO = "info"
    • TYPE_MESSAGE = "message"
    • TYPE_WARNING = "warning"
    • TYPE_ERROR = "error"
    • TYPE_DONE = "done"

    When content is a valid DOM Element, it will be attached to the message’s body directly, allowing you to customize toast however you want.

    configureToasts(options)

    Allows to configure some options of the toast. The available optional options are listed below:

    configureToasts({
        topOrigin: -100, // [default=0] Y-axis origin of the messages (better to use CSS `transform` instead).
        deleteDelay: 300 // time until the toast is completely removed from the DOM after deleting. 
    });

    Styles

    Import default toast styles from node_modules/toaster-js/default.*css (CSS, SCSS are available).

    To style the toast properly, consider that toast elements (for example, info toasts) have three states: empty state (when the toast attaches to the DOM), displayed state (when the toast is moved to its proper position), and deleted state, when the toast “fades out” from the DOM. You can control how much time the toast stays in deleted state until it disappears using deleteDelay option. States:

    <div class="toast">        <div class="body warning">...</div> </div>
    <div class="toast displayed"> <div class="body info">...</div> </div>
    <div class="toast deleted">   <div class="body done">...</div> </div>

    Contributing

    Feel free to improve this project! Building the umd.js and default.css requires the following:

    npm install
    npm run build

    License

    MIT © Nikita Savchenko

    Visit original content creator repository https://github.com/nikitaeverywhere/toaster-js
  • cog-helm

    Cog

    Cog is a ChatOps platform with some really great access control features, and allows writing additional functionality in any language.

    This chart is still alpha and will not include a Postgres database container until Helm includes a means of excluding dependent subcharts during deployment.

    In the mean time, deploying the Postgres chart from the Kubernetes charts repository will provide a small testing database for Cog’s use.

    TL;DR;

    $ git clone https://github.com/ohaiwalt/cog-helm cog
    $ helm install cog

    Introduction

    This chart bootstraps a Cog deployment on a Kubernetes cluster using the Helm package manager.

    Prerequisites

    • Kubernetes 1.4+ with Beta APIs enabled
    • External Postgresql database
    • Slack API token

    Installing the Chart

    To install the chart with the release name my-release:

    $ helm install --name my-release cog-helm

    The command deploys Cog on the Kubernetes cluster in the default configuration.

    Tip: List all releases using helm list

    Uninstalling the Chart

    To uninstall/delete the my-release deployment:

    $ helm delete my-release

    The command removes all the Kubernetes components associated with the chart and deletes the release.

    Configuration

    The following tables lists the required configuration variables. See the values.yml file for more detailed information.

    Parameter Description Default
    cog.secrets.SLACK_API_TOKEN API Token for connecting to Slack None
    cog.secrets.DATABASE_URL Database connection string ecto://cog:cog@postgres:5432/cog
    relay.config.RELAY_ID Relay Id 00000000-0000-0000-0000-000000000000

    Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

    $ helm install --name my-release \
      --set cog.secrets.SLACK_API_TOKEN=token,cog.secrets.DATABASE_URL=connection,relay.config.RELAY_ID=$(uuidgen | tr '[:upper:]' '[:lower:]') \
        cog-helm

    Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

    $ helm install --name my-release -f values.yaml cog-helm

    Tip: You can use the default values.yaml

    Persistence

    The Cog image stores configuration data and configurations in an external PostgreSQL database. This chart currently does not run a database.

    Visit original content creator repository
    https://github.com/ohaiwalt/cog-helm

  • ansible-role-fail2ban

    Install and configure fail2ban on your system.

    GitHub GitLab Downloads Version
    github gitlab downloads Version

    This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

    ---
    - name: Converge
      hosts: all
      become: true
      gather_facts: true
    
      roles:
        - role: robertdebock.fail2ban

    The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

    ---
    - name: Prepare
      hosts: all
      become: true
      gather_facts: false
    
      roles:
        - role: robertdebock.bootstrap
        - role: robertdebock.epel

    Also see a full explanation and example on how to use these roles.

    The default values for the variables are set in defaults/main.yml:

    ---
    # defaults file for fail2ban
    
    fail2ban_loglevel: INFO
    fail2ban_logtarget: /var/log/fail2ban.log
    
    fail2ban_ignoreself: "true"
    fail2ban_ignoreips:
      - "127.0.0.1/8 ::1"
    
    # In seconds
    fail2ban_bantime: 600
    fail2ban_findtime: 600
    
    fail2ban_maxretry: 5
    fail2ban_destemail: root@localhost
    fail2ban_sender: root@{{ ansible_fqdn }}
    
    fail2ban_configuration: []
    #  - option: loglevel
    #    value: "INFO"
    #    section: Definition
    
    fail2ban_jail_configuration: []
    #  - option: ignoreself
    #    value: "true"
    #    section: DEFAULT
    
    # Path to directory containing filters to copy in filter.d
    # fail2ban_filterd_path:

    The following roles are used to prepare a system. You can prepare your system in another way.

    Requirement GitHub GitLab
    robertdebock.bootstrap Build Status GitHub Build Status GitLab
    robertdebock.epel Build Status GitHub Build Status GitLab

    This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

    Here is an overview of related roles: dependencies

    This role has been tested on these container images:

    container tags
    EL 9
    Debian all
    Fedora all
    Ubuntu all

    The minimum version of Ansible required is 2.12, tests have been done to:

    • The previous version.
    • The current version.
    • The development version.

    If you find issues, please register them in GitHub.

    Apache-2.0.

    robertdebock

    Please consider sponsoring me.

    Visit original content creator repository https://github.com/robertdebock/ansible-role-fail2ban
  • cookiecutter-pypackage

    🐍🍪 Yet another Python cookiecutter

    A strongly opinionated, bleeding-edge Python template

    CI CD pre-commit.ci status GitHub Dependency Review Open in GitHub Codespaces Buy me a coffee

    💡 Quickstart

    Install the latest Cookiecutter

    pip install -U cookiecutter
    

    and generate a Python package project:

    cookiecutter gh:billsioros/cookiecutter-pypackage
    

    An up-to-date instance of the cookicutter template can be found here

    🚀 Features

    The template supports Python 3.7 or higher.

    📑 Citation

    @misc{cookiecutter-pypackage,
      author = {Vasilis Sioros},
      title = {cookiecutter-pypackage: A strongly opinionated, bleeding-edge Python template},
      year = {2023},
      publisher = {GitHub},
      journal = {GitHub repository},
      howpublished = {\url{https://github.com/billsioros/cookiecutter-pypackage}}
    }

    📖 Documentation

    The project’s documentation can be found here.

    ❤️ Support the project

    Feel free to Buy me a coffee! ☕.

    ✨ Contributing

    If you would like to contribute to the project, please go through the Contributing Guidelines first.

    Visit original content creator repository https://github.com/billsioros/cookiecutter-pypackage
  • coverwrite-ai

    All Contributors

    CoverWriteAI

    project-image

    CoverWriteAI – your ultimate tool for effortlessly generating cover letters. Say goodbye to the arduous process of crafting cover letters from scratch. With CoverWriteAI you’re just a few clicks away from your perfectly tailored cover letter.

    ⚙️ Installation and Configuration

    Use npm to install package dependencies and run.

    npm install
    npm run dev

    Replace the process.env.API_KEY in the server code with your own API key

    const API_KEY = process.env.API_KEY;
    // Replace with your own API key gotten from makersuite

    💻 Built with

    Technologies used in the project:

    🤝 Contributing

    Contributions are welcome! To contribute to this project, follow these steps:

    1. Create an Issue: Before starting work on a new feature, enhancement, or bug fix, it’s recommended to create a new issue. This allows for discussions and feedback on the proposed changes. Issues help ensure that your contribution aligns with the project’s goals and avoids duplication of effort.

    2. Fork this repository.

    3. Create a new branch: git checkout -b feature/my-feature.

    4. Make your changes and commit them: git commit -am 'Add some feature'.

    5. Push the changes to your fork: git push origin feature/my-feature.

    6. Create a pull request, explaining your changes.

    Please ensure that your pull request follows the project’s coding guidelines and standards.

    Creating an Issue

    When creating an issue, provide the following details:

    • A clear and descriptive title.
    • A detailed description of the problem or enhancement you are addressing.
    • Steps to reproduce (for bugs).
    • Any relevant code snippets or screenshots.

    By following these steps and creating an issue, you help maintain a structured development process and ensure that your contributions are aligned with the project’s objectives.

    Thank you for your contributions!

    📸 Screenshots

    Home Page

    screenshot1

    Create Page

    screenshot2

    👬 Contributors

    License

    Apache

    Visit original content creator repository https://github.com/Judge-Paul/coverwrite-ai
  • kivy_service_osc

    Purpose

    CircleCI

    This code aims at demonstrating an use of services in python-for-android, and communication between services and a kivy front end.

    That examples uses the OSC protocol for simplicity and historical reasons, (since an implementation was shipped with kivy historically, and a better one is now found in oscpy). The OSC protocol makes things simple because it’s unconnected, you just send a message, and can forget about it. You bind functions to messages you receive. It’s simple enough for a lot of things, and avoids the burden of maintaining a connection when both the service and front end can be restarted any time.

    The app is composed of the front-end, defined in src/main.py, and the back-end defined in src/service.py.

    The service (back-end):

    • is defined in buildozer.spec, in the services line. Following the example syntax
    • is started by the application at startup time, and can be stopped/restarted from the UI.
    • sends the current date, as a string, every tenth of a second to the UI, on a ‘/date’ address.
    • answers with a random string on the ‘/message’ address when a message is sent to the ‘/ping’ address on its side.

    The UI (front-end):

    • is defined in main.py
    • allows stopping/restarting the backend.
    • displays the last received messages from the backend in a RecycleView
    • allow to sent a ‘/ping’ message to the backend, which will trigger a new message.

    Building:

    • The package is built using CircleCI, you should be able to download the latest debug apk by clicking on the “Artifacts” tab on the latest build.
    • This project is a template repository, so you can create your own project from it, and setup CircleCI to build your version of it.
    • You can also just run the kivy/buildozer docker image to build your project from any Linux computer.
    docker run -v $PWD:/project/ -w /project/ kivy/buildozer android debug
    

    Once it’s completed, you should have a bin/ directory with the apk inside.

    Visit original content creator repository https://github.com/tshirtman/kivy_service_osc
  • noiserecorder

    Noise Recorder

    Retrieves white noise from the environment via the microphone and extracting the least significant bit.

    Invocation (Refer to steps below for installation)

    python -m noiserecorder --help

    Brings up help.

    python -m noiserecorder

    Generates 30 minutes (The user should be warned that this will take about 8 hours [30min (desired time)*16 (number of bits per sample)=8hrs]) of noise written to a dated file.

    python -m noiserecorder pathname/filename.wav

    Generates 30 minutes of noise written to a specific path.

    python -m noiserecorder pathname/filename.wav <duration_in_seconds>

    Generates specified duration of noise written to a specific path.

    Virtual Environment Requirements for Building

    The following packages are needed:

    System Requirements

    • Any system that supports Python.
      • Android /w Termux Installed?: Don’t even try it! I am not sure that Android’s permission system will allow audio to be recorded in the manner this software does (using sounddevice). I am not so sure about the python setup there. I have had problems with it before.
      • Anything OS not Windows/Linux/MacOS or anything running on a processor that is not Intel-based?: YMMV/I really don’t know. (Hmm. I smell a Raspberry Pi project)
      • Any of the above. Try and report.
      • ⚠️ Important Safety Tip For Android/Termux: Just in case somebody does manages to get this working on an Android phone running Termux, Please for the love of all that is Good and Holy, don’t waste your batteries, or at the very least have a friend that is not wasting their batteries when you are out in the middle of a wilderness and might get lost and need to call someone for help. Just in case gathering atmospheric noise in the middle of a desert or forest is tempting for you. I hear waterfalls are good sources of noise. Again, bring a friend with a charged phone not running this and stay safe! Remember it takes 16 seconds of recorded sound to generate 1 second of noise. Plus there is quite a bit of postprocessing at the end. I cannot be held responsible for someone getting lost or hurt and I do not want that for anybody either. So if you are going to proceed to gather noise from the wild natural environment, be thoughtful of the following: Be safe, be smart, be vigilent, and most importantly stay alive and unharmed, and are able to come back home when you are done! You have been duly warned.
      • 🗞️ News flash for Android/Termux: Portaudio library (sounddevice’s native dependency) does not work here.
    • Python 3.11 w/ pip (For best results use this version: You might be able to get away with using something as low as 3.9 but I strongly recommend using this listed version if you can)
    • virtualenv and/or venv python pip packages.

    Python Virtual Enviroment Packages (AKA don’t screw up your system’s python!)

    Install a virtual environment by doing the following: [You will have to replace the ~ with $env:USERPROFILE (powershell.exe/pwsh.exe) and /’s with ‘s if you are on Windows]

    python3.11 -m venv --copies --upgrade-deps ~/path/to/noiserecorder_venv

    Virtualenv Instructions:

    python3.11 -m virtualenv --copies ~/path/to/noiserecorder_venv

    If you are using Windows Store Version of Python:

    • Open Start Menu
    • Search for Python 3.11
    • Open Python 3.11

    In the Python Prompt do the following (One line at a time):

    import os
    os.system('pwsh') # Start Powershell

    Once in Powershell Subprocess do the following (One line at a time):

    cd # Go Home
    python -m venv --copies --upgrade-deps $env:USERPROFILE\path\to\noiserecorder_venv
    exit

    Exit Windows Store Python:

    exit()

    If you encounter access denied issues attempting to run python from the pwsh subshell, try this in the windows store python interactive shell (One line at a time):

    Python:

    import venv
    import os
    userdir = os.environ['USERPROFILE']
    venv.create(userdir + '\path\to\noiserecorder_venv',with_pip=True,upgrade_deps=True)
    exit()

    Enter your virtual environment:

    bash:

    . ~/path/to/noiserecorder-venv/bin/activate

    Windows powershell/pwsh:

    . $env:USERPROFILE\path\to\noiserecorder-venv\bin\Activate.ps1

    Windows powershell/pwsh (A virtual environment installed using Windows Store Python):

    . $env:USERPROFILE\path\to\noiserecorder-venv\Scripts\Activate.ps1

    • wheel (You really should install this by itself first.)
    • altgraph
    • auto-py-to-exe (Just in case you want to build an self-contained executable. [You probably shouldn’t! Your machine might flag the executable! ]
    • bottle
    • bottle-websocket
    • cffi
    • Eel
    • future
    • gevent
    • gevent-websocket
    • greenlet
    • idle
    • pefile
    • pip (You don’t have to install this venv/virtualenv should have done this for you.)
    • pycparser
    • pycryptodome (Encryption added for the peace of mind and privacy of any would be noise collector.)
    • pyinstaller
    • pyinstaller-hooks-contrib
    • pyparsing
    • setuptools (Same as pip, installed by virtual/venv already)
    • sounddevice (Lets grab some sound and make some noise with it!)
    • whichcraft
    • zope.event
    • zope.interface

    Install these packages in the virtual environment:

    bash:

    for f in wheel altgraph bottle bottle-websocket cffi Eel future gevent gevent-websocket \
    greenlet idle pefile pycparser pycryptodome pyinstaller \
    pyinstaller-hooks-contrib pyparsing sounddevice \
    whichcraft zope.event zope.interface
    do
        python -m pip install "$f"
    done

    pwsh (Windows):

    @('wheel','altgraph','bottle',
    'bottle-websocket','cffi','Eel','future','gevent',
    'gevent-websocket','greenlet','idle','pefile','pycparser',
    'pycryptodome','pyinstaller','pyinstaller-hooks-contrib','pyparsing',
    'sounddevice','whichcraft','zope.event','zope.interface') |
    ForEach-Object {& python -m pip install "$_"}

    Install noiserecorder itself:

    bash:

    # $PATH_TO_NOISERECORDER_SOURCE_MODULE is a stand-in for the actual path to your checked out copy of the noiserecorder module.
    python -m pip install $PATH_TO_NOISERECORDER_SOURCE # It is the top of this project folder that contains setup.py and this Readme.md file, it is NOT the inner noiserecorder package folder that contains __init__.py and friends.

    pwsh (Windows):

    # $env:PATH_TO_NOISERECORDER_SOURCE_MODULE is a stand-in for the actual path to your checked out out copy of the noiserecorder module.
    cd $env:PATH_TO_NOISERECORDER_SOURCE_MODULE
    & python -m pip install $env:PATH_TO_NOISERECORDER_SOURCE # It is the folder that contains setup.py and this Readme.md file, it is NOT the inner noiserecorder package folder that contains __init__.py and friends.

    Visit original content creator repository
    https://github.com/chazzofalf/noiserecorder

  • scarango

    Visit original content creator repository
    https://github.com/PMA-Solutions/scarango