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.
@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:
#
@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

@taniarascia
taniarascia / index.html
Last active April 3, 2024 21:05
HTML Skeleton file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@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']
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1