Skip to content

Instantly share code, notes, and snippets.

View moalex's full-sized avatar
🫛
Farting

moalex moalex

🫛
Farting
View GitHub Profile
@moalex
moalex / alfredxing-calc.md
Last active September 13, 2018 08:54
A simple, fast, and intuitive command-line calculator written in Go.

calc

GitHub

A simple, fast, and intuitive command-line calculator written in Go.

Install

@moalex
moalex / document.ready.ts
Created April 1, 2019 22:58 — forked from supermoos/main.ts
TypeScript jQuery document ready
///<reference path="./typings/jquery/jquery.d.ts"/>
'use strict';
class Main {
constructor() {
jQuery(document).ready(() => {
console.log('Hello from app/scripts/ts/Main.ts');
});
}
}

Batch convert

The simplest solution is like most already posted. A simple bash for loop.

for i in *.png
do
  convert "$i" "${i%.*}.jpg"
done
/**
* Basecamp Redmine
*/
@-moz-document regexp(".*redmine.*") {
body, #wrapper {
background-color:#eee;
font-family:"Lucida Grande", verdana, arial, helvetica, sans-serif;
}
a:hover {
text-decoration: underline;
@moalex
moalex / renamed.sh
Created February 22, 2021 15:51
This utility will find <Search> string and replace it with <Replacement> string in all files in current folder including their both filename and contents.
#!/bin/bash
cat <<EOF
This utility will find <Search> string and replace it with <Replacement> string
in all files in current folder including their both filename and contents
EOF
# check if GNU rename utility exists
if [ ! -f /usr/local/bin/rename ]

[MediaInfo][h]

Usage

mediainfo [-Options...] FileName1 [Filename2...]"
@moalex
moalex / nnn-wiki.md
Created May 31, 2021 12:02
nnn-wiki

Dependencies

A curses library with wide char support (e.g. ncursesw), libc and libreadline (optional).

Utility deps Install? Operation
xdg-open (Linux), open(1) (macOS), cygstart (Cygwin), open (Haiku) base default opener
file, coreutils (cp, mv, rm), xargs, sed (gnu-sed on macOS) base file type, copy, (re)move
tar, (un)zip [atool/bsdtar for more formats] base create, list, extract bzip2, (g)zip, tar
archivemount, fusermount(3)/umount (macOS) optional (un)mount archives
@moalex
moalex / aria2c.md
Last active January 22, 2024 18:09
@moalex
moalex / string-is-empty.sh
Created October 12, 2021 11:58
bash :: Пустая ли строка
#!/bin/bash
val1="testing"
val2=''
### Не пустая ли строка
if [ -n $val1 ]; then
echo "Строка '$val1' не пустая"
else
echo "Строка '$val1' пустая"
@moalex
moalex / atomicparsley-help.md
Last active February 22, 2022 13:57
AtomicParsley - Help page for setting iTunes-style metadata into MPEG-4 files

[AtomicParsley][@]

Help page for setting iTunes-style metadata into MPEG-4 files.


atomicparsley [mp4FILE]... [OPTION]... [ARGUMENT]... [ [OPTION2]...[ARGUMENT2]...]