Skip to content

Instantly share code, notes, and snippets.

@TroyKomodo
TroyKomodo / rmq.rs
Last active April 25, 2024 09:33
rmq connection pool
use std::{
sync::{atomic::AtomicUsize, Arc},
time::Duration,
};
use anyhow::{anyhow, Result};
use arc_swap::ArcSwap;
use async_stream::stream;
use futures::{Stream, StreamExt};
use lapin::{
@ishad0w
ishad0w / microsoft_edge_uninstaller_21h1_ltsc.bat
Last active April 25, 2024 09:33
Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
@echo off
@title Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
ver
echo+
goto check_admin_permissions
:check_admin_permissions
echo Script must Run as Administrator! Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
@luistojal93
luistojal93 / Function.php
Created April 25, 2024 09:32 — forked from Vagrantin/Function.php
Wordpress - filter post by tags using AJAX.
<?php
/**
*
* Functions and definitons
* This is a child theme of Twentysixteen theme
* V1.0 - AJAX Filter posts
* Largely inspired by Vlado Bosnjak work that you can find here:
* https://www.bobz.co/filter-wordpress-posts-by-custom-taxonomy-term-with-ajax-and-pagination/
*
*
@zodiacfireworks
zodiacfireworks / geant4_installer.sh
Last active April 25, 2024 09:31
Full installation of Geant4 (10.04.p02) with QT and all it's data sets
#! /usr/bin/env bash
sudo apt-get -y install \
autotools-dev \
axel \
binutils \
build-essential \
cmake \
console-setup \
dpkg-dev \
expat \
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active April 25, 2024 09:31
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@ardakazanci
ardakazanci / Bar.kt
Created April 24, 2024 15:49
Bar with JetpackCompose
data class BarDataM(val value: Float, val label: String)
@Composable
fun BarChartComponent(
bars: List<BarDataM>,
barWidth: Dp,
spaceBetweenBars: Dp,
animateChart: Boolean
) {
var selectedBar by remember { mutableIntStateOf(-1) }
.css-selector {
    background: linear-gradient(157deg, #132923, #10b981, #151515, #383838);
    background-size: 800% 800%;
    -webkit-animation: AnimationName 25s ease infinite;
    -moz-animation: AnimationName 25s ease infinite;
    -o-animation: AnimationName 25s ease infinite;
    animation: AnimationName 25s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
.css-selector {
    background: linear-gradient(270deg, #007aff, #ff0000, #33ff00);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 17s ease infinite;
    -moz-animation: AnimationName 17s ease infinite;
    -o-animation: AnimationName 17s ease infinite;
    animation: AnimationName 17s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:1% 0%}
@youknowriad
youknowriad / log.js
Created April 24, 2024 22:47
Gutenberg Log Deprecations
const { createElement: el, useState, useEffect } = React;
const PanelBody = wp.components.PanelBody;
const PluginSidebar = wp.editor.PluginSidebar;
const addAction = wp.hooks.addAction;
const registerPlugin = wp.plugins.registerPlugin;
function MyPluginSidebar() {
const [ deprecations, setDeprecations ] = useState( [] );
useEffect( () => {
addAction(
@shamil
shamil / mount_qcow2.md
Last active April 25, 2024 09:25
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8