Skip to content

Instantly share code, notes, and snippets.

View V3ntus's full-sized avatar

Ventus V3ntus

View GitHub Profile
@matthew-carroll
matthew-carroll / dry_layout_stop_gap.dart
Created January 3, 2021 00:39
DryIntrinsicWidth and DryIntrinsicHeight
/// Same as `IntrinsicWidth` except that when this widget is instructed
/// to `computeDryLayout()`, it doesn't invoke that on its child, instead
/// it computes the child's intrinsic width.
///
/// This widget is useful in situations where the `child` does not
/// support dry layout, e.g., `TextField` as of 01/02/2021.
class DryIntrinsicWidth extends SingleChildRenderObjectWidget {
const DryIntrinsicWidth({Key key, Widget child})
: super(key: key, child: child);
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active May 13, 2025 13:19
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m
@V3ntus
V3ntus / automate_pivot.sh
Last active August 7, 2024 21:22
How to tunnel with ligolo-ng
#!/bin/bash
# If you do not have ssh keys for root, remove all -i flag and $REMOTE_ROOT_KEYS instances from the script
REMOTE= # IP/hostname of remote target
REMOTE_ROOT_KEYS= # path to id_rsa of root user on remote target
LIGOLO_AGENT= # path to agent binary
LIGOLO_PROXY= # path to proxy binary
CURRENT_USER=$(whoami)
echo "[L] Uploading agent to remote..."
packages.objectbox-c = with pkgs; let
pname = "objectbox-c";
version = "0.18.1";
src = fetchurl {
url = "https://github.com/objectbox/${pname}/releases/download/v${version}/objectbox-linux-x64.tar.gz";
hash = "sha256-oYz8ZBNdoTG3NDOuiu0JbmiAmSg4jQf9DQQIMZaNfNQ=";
};
in
stdenv.mkDerivation rec {
inherit pname version src;