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;
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active July 21, 2024 12:46
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

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@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 July 15, 2024 21:37
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 January 30, 2024 06:45
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 February 18, 2024 21:14
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
@steven2358
steven2358 / ffmpeg.md
Last active July 13, 2024 20:20
FFmpeg cheat sheet