Skip to content

Instantly share code, notes, and snippets.

View moalex's full-sized avatar
🫛
Farting

moalex moalex

🫛
Farting
View GitHub Profile
@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 ]
@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' пустая"

ImageMagic Color Invert

ImageMagick 6

Can invert color intensities with -negate option only)

[-negate][neg]

M3U Playlist Exmple

Examples

Ниже приведен пример файла extended M3U на платформе Windows. Песня.mp3 и Песня.ogg — это медиафайлы, 123 и 321 — длительность. Если продолжительность медиафайла неизвестна, в параметре длительность можно указать −1 (обычно указывают для потоков: онлайн-радио, телевидение, вещание). После параметра длительность указывается параметр название, который по умолчанию эквивалентен пути файла, что указывается во второй строке. На платформах Mac OS X и Linux используются Unix путь.

#EXTM3U
@moalex
moalex / composer-devhints.md
Last active February 22, 2022 14:18 — forked from robdecker/1.md
[Composer commands] #composer #d8
<?php
// autoload_namespace.php generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Volcanus\\Validation' => $vendorDir . '/volcanus/validation/src/',
'Symfony\\Component\\HttpFoundation' => $vendorDir . '/symfony/http-foundation/',
@moalex
moalex / gist:b48816a07da1ba1b24745e6c1c9f6e36
Created April 14, 2022 23:07 — forked from beh/gist:3549933
Add bookmark to pinbord.in with predefined tag, without user intervention
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));
// Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto!