Skip to content

Instantly share code, notes, and snippets.

View cleverfox's full-sized avatar
🎯
Focusing

Vladimir Goncharov cleverfox

🎯
Focusing
  • Pattaya, Thailand
  • 22:27 (UTC +07:00)
View GitHub Profile
@cleverfox
cleverfox / cmd to birman.json
Created December 2, 2023 08:42 — forked from piskov/cmd to birman.json
Command to birman layout switcher
{
"title": "Change keyboard layout on cmd press",
"rules": [
{
"description": "Change input source to En Birman by left_command; Ru Birman by right_command.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
@cleverfox
cleverfox / timetop.erl
Created January 18, 2018 16:10 — forked from stolen/timetop.erl
top processes by scheduled time
-module(timetop).
-export([top/2]).
top(Duration, Count) ->
OldPrio = erlang:process_flag(priority, high),
Result = scheduled_time_top(Duration),
erlang:process_flag(priority, OldPrio),
lists:sublist(Result, Count).
package Mojolicious::Plugin::Pipeline::CSSCompressor;
use Mojo::Base 'Mojolicious::Plugin';
use CSS::Compressor 'css_compress';
sub register {
my ($self, $app) = @_;
# Register "css_compressor" filter
$app->filter(css_compressor => sub { css_compress shift });