Skip to content

Instantly share code, notes, and snippets.

View V3ntus's full-sized avatar
Remind me to code again

Ventus V3ntus

Remind me to code again
View GitHub Profile
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;
@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..."
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active August 23, 2024 15:05
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
@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);
@MeguminSama
MeguminSama / Discord Experiments.js
Last active September 13, 2024 15:14
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@CMCDragonkai
CMCDragonkai / nixos_recovery.md
Created December 13, 2018 01:25
NixOS Recovery #nix

NixOS Recovery

Usually if you screw up the configuration.nix you can rollback to a previous generation during boot.

Then you use https://nixos.org/nixos/manual/#sec-rollback to fix the rollback generation.

However if you really screw it up, and none of the generations work, you may need use a recovery method.

Get a NixOS ISO (it's best to get one that has a same or similar version as your current one).

@slightfoot
slightfoot / stream_text.dart
Last active August 27, 2024 02:47
Streaming Text in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
void main() =>
runApp(MaterialApp(
home: ExampleScreen(),
));
class ExampleScreen extends StatelessWidget {
@kevinwright
kevinwright / proresproxy.sh
Last active September 20, 2024 10:04
Use ffmpeg to build prores proxies for Premiere Pro
#!/usr/bin/env bash
# Usage notes
# ===========
#
# proxy_watermark.png needs to be in the same directory as the script
# download from here: http://whoismatt.com/images/2016/7-july/adobe_proxy_logo.png
#
# on OSX, both pv and ffmpeg will need to be installed via homebrew