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
[*] | |
charset = utf-8 | |
end_of_line = lf | |
tab_width = 4 | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = false | |
max_line_length = 80 | |
ij_visual_guides = 80 | |
ij_wrap_on_typing = true |
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 | |
_() { echo $(awk 'END{x=$2;$2=$3;$3=x+$2;print}' < "$0")| tee -a "$0" ; } | |
: 0 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
import org.junit.Assert; | |
final class Loop extends Exception { | |
Loop(long max, Iter iter) throws Exception { | |
super(iter); | |
try { | |
Assert.assertTrue(max > 0); | |
throw new Loop(max - 1, new Iter(iter)); | |
} catch (final AssertionError fal) { | |
throw new Exception(iter); | |
} |
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
find . -name '*.java' -exec perl -007 -nE '/(?<=class\s)(\S+?)([A-Z][a-z]+?)(?:Impl)?\s/ && say $2' {} \+ | sort | uniq -c | sort -rn |head -8 |
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
find src/test/ -name '*Test.java' -o -name '*ITCase.java' -exec perl -007 -i -pE 'unless($_ =~ /@Test\(expected/xgsm || $_ =~ /@(Class)?Rule/xgsm) { s/^public final class/final class/sgm; s/@Test^\s{4}public void/ void/sgm; s/org.junit.Test/org.junit.jupiter.api.Test/}' {} \; |
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
;;; Commentary: | |
;;; Minimal vi-like Emacs configuration. | |
;;; | |
;;; $ emacs -Q -nw -l mini.el | |
;;; | |
;;; Code: | |
;; Visual bell | |
(setq-default visible-bell t) | |
;; Do not display mode-line | |
(setq-default mode-line-format nil) |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
emacs_ = (pkgs.unstable.emacs.override { | |
withGTK3 = false; | |
withGTK2 = false; | |
}).overrideAttrs (attrs: { | |
configureFlags = [ | |
"--disable-build-details" | |
"--with-modules" |
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 | |
use strict; | |
use warnings; | |
use open qw( :encoding(UTF-8) :std ); | |
use English qw( -no_match_vars ); | |
while ( my $line = <> ) { | |
my $count = $line =~ s{ | |
[\N{U+07FF}-\N{U+7FFFFFF}] | |
} [?]xg; |
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
find src -name '*.java' -exec perl -i -nE 'print unless /[@](version|author)/' {} \+ | |
find src -name '*.java' -exec perl -i -007 -pE 's{^/[*][*]}{/*}' {} \; |
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 | |
set -u | |
list_all_ids() { xinput list --id-only; } | |
device_by_id() { xinput list --short "$1";} | |
device_property() { | |
xinput list-props "$1" | while read -r prop | |
do | |
case "$prop" in | |
*"$2"*:*[01]) | |
echo "${prop#*:}" | xargs |
OlderNewer