This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# ©2023 David Leadbeater <https://dgl.cx/0bsd>; SPDX-License-Identifier: 0BSD | |
# | |
# A git pager that wraps less and links commits, plus makes hiding things via | |
# backspace not work. Your terminal and less will need support for "OSC8": | |
# https://github.com/Alhadis/OSC8-Adoption | |
=pod # Setup; run these commands: | |
wget https://gist.github.com/dgl/ef848e75c03c09b0db63a43173ee5662/raw/git-osc8-pager && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -nT "${1:--}" https://🗑️ .st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d2ed74f548fb33029a1d759c328216c5e6f5ff63 Mon Sep 17 00:00:00 2001 | |
From: David Leadbeater <dgl@dgl.cx> | |
Date: Wed, 6 Dec 2023 14:17:25 +1100 | |
Subject: [PATCH] confirm-paste: No prompt for whitespace with bracketed paste | |
Bracketed paste mode means the program is suggesting it can handle | |
pastes, so just send the data to it if it is on and enabled. The main | |
downside of this is there's no prompting for large pastes anymore. | |
There's also a minor security advantage of this -- currently if using |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script> | |
const PUSHGATEWAY = 'http://pushgateway:9091'; | |
class Pushgateway { | |
constructor(baseUrl, instanceLabels) { | |
this.baseUrl = baseUrl; | |
this.instanceLabels = instanceLabels; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local hipchat = import "hipchat.jsonnet"; | |
local params = hipchat.defaultParameters; | |
hipchat.notify({}, params + { | |
APIURL: "http://my.hipchat.local/", | |
AuthToken: "xxxx==", | |
RoomID: 42, | |
from: "alertmanager", | |
message: "test", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use threads; | |
use threads::shared; | |
use warnings; | |
use 5.12.0; | |
use Archive::Peek::Libarchive; | |
use Parse::CPAN::Packages; | |
use Path::Class; | |
use Term::ANSIColor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package a; | |
sub foo { | |
warn "foo"; | |
} | |
sub rebind { | |
no warnings "redefine"; | |
eval q{delete $a::{foo}}; | |
eval q{*foo = sub { warn "bar" }}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Aaaaaaaa::Test; | |
use Test::More (); | |
sub import { | |
local $_[0] = "Test::More"; | |
goto \&{Test::More->can("import")}; | |
} | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# installblead: An install script that installs a development version of perl | |
# (from git) and keeps a particular set of modules installed. Sort of perlbrew | |
# for blead, but not quite. | |
# Usage: | |
# wget -O ~/bin/installblead https://gist.github.com/raw/792206/installblead | |
# chmod +x ~/bin/installblead | |
# | |
# git clone git://perl5.git.perl.org/perl # or git pull, whatever |
NewerOlder