Skip to content

Instantly share code, notes, and snippets.

View veerendra2's full-sized avatar
🎯
Focusing

Veerendra veerendra2

🎯
Focusing
View GitHub Profile
import socket, struct, os, array
from scapy.all import ETH_P_ALL
from scapy.all import select
from scapy.all import MTU
class IPSniff:
def __init__(self, interface_name, on_ip_incoming, on_ip_outgoing):
self.interface_name = interface_name
@joaopizani
joaopizani / gnu-screen-shared.md
Created March 20, 2013 00:20
The README of my gnu-screen-shared repo, as of March 2013, for publication purposes.

gnu-screen-shared

GNU Screen has A LOT of interesting applications, and I like it a lot - so much that I have spent some time tinkering it.

One of the MOST interesting features that GNU Screen provides is screen session sharing. That means that you can start a screen session on your computer and OTHER USERS can connect to that screen session in order to just watch or also interact with the session. You can have a remote colleague log in to your machine via SSH using a "guest" account, for example, and

@jocooler
jocooler / sites_down.yaml
Created November 14, 2018 16:28
YAML rule for elastalert and heartbeat site monitoring.
es_host: your_host
es_port: your_port
name: Sites Down
description: Site pings returned down more than once in 15 minutes.
type: frequency
index: heartbeat-*
num_events: 2
timeframe:
minutes: 15
filter:
@mlaitinen
mlaitinen / main.py
Created July 30, 2019 15:12
Odoo 12 Prometheus instrumentation
##############################################################################
#
# Author: Miku Laitinen / Avoin.Systems
# Copyright 2019 Avoin.Systems
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
@shantanoo-desai
shantanoo-desai / README.md
Last active February 20, 2023 20:13
tiguitto (Telegraf, InfluxDBv1.x, Grafana, Mosquitto) stack with Traefik v2.3 reverse proxy using docker

tiguitto Stack with Traefik v2.3 as reverse-proxy

  • Tested on Raspberry-Pi 4 Model B 2GB RAM
  • Docker Version: 19.03.8
  • Docker-Compose version: 1.25.5

Directory structure:

 .
@filipkral
filipkral / python-cheat-sheet-basic.py
Last active March 12, 2023 12:30
Basic Python Cheat Sheet
#!/usr/bin/env python
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16"""
"""
Python is a cross-platform, interpreted, object-oriented programming language.
That means you can run it on Linux, Windows, Mac, and other platforms,
you don't need to compile your code to execute it because it is compiled on
the fly, and you can use classes and objects.
@didip
didip / supervisord-example.conf
Created January 30, 2011 05:10
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@renaudcerrato
renaudcerrato / hostapd.conf
Created May 27, 2016 13:31
Sample hostapd.conf for documentation.
##### hostapd configuration file ##############################################
# Empty lines and lines starting with # are ignored
# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames with the Host AP driver); wlan0 with many nl80211 drivers
interface=wlan0
# In case of atheros and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# interface is included in a bridge. This parameter is not used with Host AP
@deviantony
deviantony / README.md
Created March 8, 2018 01:24
Portainer admin password in a docker-compose environment

Portainer compose deployment with admin password preset

This file aims to explain how to deploy Portainer inside a compose file with the admin password already set.

Generate the admin password

For this example, we'll use the password superpassword.

Use the following command to generate a hash for the password:

@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off