This file contains hidden or 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/bash | |
| exec 0</dev/null | |
| if [ "$1" == "on" ]; then | |
| # if jack-server isn't already running | |
| if ! pidof "jackd" 1>&- 2>&-; then | |
| jackd -dalsa -dhw:USB -r44100 -p512 -n3 -i2 -o2 1>/dev/null & | |
| sleep 2 |
This file contains hidden or 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
| Section "ServerLayout" | |
| Identifier "X.org Configured" | |
| Screen 0 "Screen0" 0 0 | |
| InputDevice "Mouse0" "CorePointer" | |
| InputDevice "Keyboard0" "CoreKeyboard" | |
| EndSection | |
| Section "Files" | |
| ModulePath "/usr/lib64/xorg/modules" | |
| FontPath "catalogue:/etc/X11/fontpath.d" |
This file contains hidden or 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 perl6 | |
| use v6; | |
| use NativeCall; | |
| class GtkWidget is repr('CPointer') {} | |
| sub gtk_init(CArray[int32] $argc, CArray[CArray[Str]] $argv) is native('gtk') {*} | |
| sub gtk_window_new(int32 $window_type --> GtkWidget) is native('gtk') {*} | |
| sub gtk_main() is native('gtk') {*} | |
| sub gtk_window_set_title(GtkWidget $window, Str $title) is native('gtk') {*} |
This file contains hidden or 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 perl6 | |
| use v6; | |
| close $*IN; | |
| my Int $line-limit := 60; | |
| my Str $BS := "\c[BACKSPACE]"; | |
| my Str $UP := "\c[ESCAPE][1A"; | |
| sub show-message(Str $message) { | |
| my Str @args = Q:w <dzen2 -p -bg red -fg white -fn -*-sans-bold-*-*-*-*-*-*-*-*-*-*-*>; | |
| my Proc::Async $proc := Proc::Async.new(:w, |@args); |
This file contains hidden or 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
| (() => { | |
| const isDeletingInProgress = () => { | |
| const el = document.querySelector('.modal-body'); | |
| return el.innerText === 'Deleting messages...'; | |
| }; | |
| const waitFor = (f, timeout = 500) => new Promise(resolve => { | |
| const r = () => { | |
| const value = f(); |
This file contains hidden or 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 stack | |
| {- | |
| stack | |
| --resolver lts-7.21 | |
| --install-ghc | |
| runghc | |
| --package base-unicode-symbols | |
| --package dbus | |
| --package X11 | |
| -} |
This file contains hidden or 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
| -- Author: Viacheslav Lotsmanov | |
| -- License: AGPLv3 | |
| {-# LANGUAGE UnicodeSyntax #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} |
This file contains hidden or 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 perl6 | |
| use v6.c; | |
| sub MAIN(Int $count = 8, Bool :$special-chars = False) { | |
| my Str @more-chars; | |
| @more-chars.append: '#@&$%_-=+~*^\|/;:,.?!'.split: '', :skip-empty | |
| if $special-chars; | |
| my \chars = (('a'..'z'), ('A'..'Z'), ('0'..'9'), @more-chars) |
This file contains hidden or 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
| -- … | |
| setOpacityPercent ∷ Display → Window → Integer → IO () | |
| setOpacityPercent dpy wnd (toRational → percent) = do | |
| opacityAtom ← internAtom dpy "_NET_WM_WINDOW_OPACITY" False | |
| withArrayLen [x] $ \len ptr → | |
| () <$ xChangeProperty dpy wnd opacityAtom cARDINAL 32 propModeReplace | |
| (castPtr ptr) (fromIntegral len) |
This file contains hidden or 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/bash | |
| if [[ -z $1 ]] || [[ -z $2 ]]; then | |
| echo Usage: "$(basename -- "$0")" \ | |
| SOURCE-VOLUME-ID DESTINATION-VOLUME-ID 1>&2 | |
| exit 1 | |
| fi | |
| docker run --rm -it -v "$1:/vol-src" -v "$2:/vol-dst" alpine \ | |
| ash -c 'cp -r /vol-src/* /vol-dst/' || exit $? |