Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.clipboard-button {
display: none;
}
.clipboard--supported .clipboard-button {
# Just some meta stuff I found interesting ...
sub meta-method-names {
Metamodel::ClassHOW.^methods>>.name
}
sub core-names {
CORE::.keys
}
# 0.25 500$
# 2000,
use IO::Prompt;
# http://www.builtlean.com/2010/05/04/ideal-body-weight-formula-how-to-calculate-your-ideal-weight/
sub postfix:<%>(Numeric $x --> Numeric) {
$x / 100
}
@4d47
4d47 / a.elisp
Created March 10, 2017 17:04
kak-expand-region-el
;;
;; emacs -script a.elisp -- a.html 12.1,12.1
;;
;;TODO: Kakoune counts columns from 1, emacs from 0
;;
(require 'package)
(package-initialize)
(require 'use-package)
(require 'expand-region)
(require 'html-mode-expansions)
@4d47
4d47 / setpipe
Last active December 2, 2017 16:08
#!/usr/bin/perl
use strict;
use lib ($ENV{RLWRAP_FILTERDIR} or ".");
use RlwrapFilter;
my $cmd;
my $filter = RlwrapFilter->new;
$filter->help_text("Usage: rlwrap -z setpipe <command>\n"
."Intercept line starting with | and pipe further output thru it.\n"
."Use |<ret> to remove previously set pipe commands.\n");
use v6;
use Template::Anti;
multi process($root, %data where { .values.all ~~ Cool }) {
# Treat content attribute specially
if %data<content>:exists {
$root.text(%data<content>); # this should be 'content'
%data<content>:delete;
}
(setq-default
mode-line-format '("%e %b ܃ "
(:eval
(if (use-region-p)
(if (eq (point) (region-beginning))
(format "%%l … %d" (line-number-at-pos (region-end)))
(format "%d … %%l" (line-number-at-pos (region-beginning))))
"%l"))
(:eval
;; TODO: on click `set-buffer-file-coding-system'
@4d47
4d47 / gist:8596ce5cadaba111f756
Last active August 29, 2015 14:10
keybase.md
### Keybase proof
I hereby claim:
* I am 4d47 on github.
* I am 4d47 (https://keybase.io/4d47) on keybase.
* I have a public key whose fingerprint is 6AAE 2EBD BA82 A9E9 2D46 5C94 330B 912A 6079 0AE2
To claim this, I am signing this object: