Skip to content

Instantly share code, notes, and snippets.

View Xenthys's full-sized avatar
💻
Site Reliability Engineer

Dylan Ysmal Xenthys

💻
Site Reliability Engineer
View GitHub Profile
@Zoddo
Zoddo / gist:6407aabed53f03ef3ecfa04bbbd062d8
Last active October 2, 2016 02:16
AntiNoisyBot commands
All commands must be sent in the control-channel, prefixed with "!" or in another channel, prefixed with "AntiNoisyBot: ".
ping [<string>]
Reply "pong <string>"
monitor #<channel> [report_only] Restrict to flag "a"
Adds the channel to the list of monitored channel. If report_only is used, the bot will only
report detections on the control-channel.
@Zoddo
Zoddo / 1_pf_identd_proxy.php
Last active October 29, 2016 20:22
A script to proxy identd requests to hosts NAT'd with PF (Packet Filter) on FreeBSD (for pfSense for example)
<?php
const MAX_PORT = 65535;
const REGEX_V4 = '#^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5})$#';
const REGEX_V6 = '#^([0-9a-f:])\[(\d{1,5})\]$#';
// Listen TCP port 113
$srv = socket_create_listen(113);
if (!$srv) {
echo "Unable to bind the server on port 113: " . socket_strerror(socket_last_error()) . "\n";
@Hackerjef
Hackerjef / shorturldomains
Last active March 1, 2019 05:03
short url list
0rz.tw
1-url.net
126.am
1link.in
1tk.us
1un.fr
1url.com
1url.cz
1wb2.net
2.gp
@azlux
azlux / Warning_IPTABLES.md
Last active March 7, 2022 11:08
Sécurité avec iptables et l'option RELATED

Problème d'ouvertue de port non désirée sur une configuration IPTABLES

Un problème de contournement des règles iptables fixées par utilisateur peut survenir avec l’utilisation de règles iptables RELATED,ESTABLISH trop générique et le chargement de helper de service non présent ou non utilisé sur la machine (exemple FTP actif, SIP, IRC …).

True fact: Mon server MariaDB s'est fait attaqué comme ça alors que le port dans l'iptable n'était pas ouvert.


Menu

  1. Rappel
@Polsaker
Polsaker / img2irc.py
Last active April 13, 2022 21:36
Makes beautiful ART from regular, boring images.
#!/usr/bin/env python3
# MIT License.
# Copyright (c) 2016 Ramiro Bou (Polsaker)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@habnabit
habnabit / chatserver.py
Created September 29, 2012 20:10
one expression chatserver
main = lambda port: (lambda dt: (lambda mm: (lambda n: (map(lambda r: (lambda
rr: setattr(n, *rr) if (type(rr) is tuple and len(rr) == 2) else None)(r()),
[lambda: map(setattr, *zip(*[(n, m, __import__(m)) for m in mm.m.decode('ba'
'se64').split()])), lambda: map(n.s['signal.signal'], (n.s['signal.SIGINT'],
n.s['signal.SIGTERM']), [lambda s, f: (n.s['sys.exit']() if n.f else [n.sa(
mm.l[0], n.o)] and n.u('f', True) or n.fc(n.l))] * 2), lambda: setattr(mm,
'l', mm.l.decode('base64').split('~~~')), lambda: ('sw', n.s['types.Functio'
'nType'] (compile("try:\n\tv = n.select.select(n.so, n.w(), [])\nexcept n.s"
"elect.error, e:\n\tif e[0] != n.errno.EINTR: raise\nelse:\n\tn.u('sr', v)",
'', 'exec'), dict(n=n, OSError=OSError))),lambda: ('l', n.s['socket.socket']
@lucienbill
lucienbill / window11_disable_internet_search_in_menu
Last active November 14, 2022 15:19
This command disables the internet results when you search things in the Windows menu
# About Windows 11 whenever you hit the "Windows" key, the Windows menu
# appears, and it has a search engine! Neat!
# But that's not all: this search engine doesn't just look for content on your
# computer, it also searches on the internet.
#
# I love this kind of features, unless it is forced onto the user. There isn't
# any way to toggle it on or off in Windows' UI, which makes me really hate it.
#
# Run this command in a CMD or PowerShell terminal to disable this feature:
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search\ /v BingSearchEnabled /t REG_DWORD /d 0
@meew0
meew0 / apitosqa.md
Last active December 22, 2022 04:10
API ToS Q&A Summary

This is a summary of the Q&A regarding the new API ToS that took place in the #api channel on the Discord API server, starting around midnight UTC on Thursday, August 17, 2017.

All answers are from b1nzy unless marked otherwise. This is just a summary of my (meew0) own interpretation of the Q&A; obviously this shouldn't be interpreted as anything legally binding. If in doubt, ask the devs yourself or consult a lawyer. I'm not responsible if you get banned or sued because of this document. All subsequent usages of first-person pronouns refer to the people asking/answering the questions, respectively.

Q. How do we detect users deleting their accounts, if we have to delete their data within 7 days?
A. You will get an email by Discord if that happens. Make sure the account that registered the bot application has an email attached to it that you actually get messages with. This may change in the future but if it will, there will be plenty of time before the new mechanism goes into effect.

Q. **Do we need

@joepie91
joepie91 / monolithic-vs-modular.md
Last active August 2, 2023 08:17
Monolithic vs. modular - what's the difference?

When you're developing in Node.js, you're likely to run into these terms - "monolithic" and "modular". They're usually used to describe the different types of frameworks and libraries; not just HTTP frameworks, but modules in general.

At a glance

  • Monolithic: "Batteries-included" and typically tightly coupled, it tries to include all the stuff that's needed for common usecases. An example of a monolithic web framework would be Sails.js.
  • Modular: "Minimal" and loosely coupled. Only includes the bare minimum of functionality and structure, and the rest is a plugin. Fundamentally, it generally only has a single 'responsibility'. An example of a modular web framework would be Express.

Coupled?

In software development, the terms "tightly coupled" and "loosely coupled" are used to indicate how much components rely on each other; or more specifically, how many assumptions they make about each other. This directly translates to how easy it is to repla

@DonSYS91
DonSYS91 / ipv6_proxmox_online.net.md
Last active January 4, 2024 10:25
Configuring IPv6 block from Online.net On Proxmox Host and Guests

Configuring IPv6 block from Online.net On Proxmox Host and Guests

Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.

On Proxmox Host (Or Debian if single Debian Installation)

Enable IPv6 on the System:

  • Change Module Options to Enable IPv6: