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
package tmpls | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log/slog" | |
"os" | |
"strings" |
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 Mojo::Base -strict; | |
use Mojo::Util qw(dumper getopt encode decode); | |
use Mojo::File 'path'; | |
getopt | |
'i|infile=s' => \my $file_in, | |
'o|outfile=s' => \my $file_out, | |
'c|cz2bg' => \my $_cz2bg_, | |
'b|bg2cz' => \my $_bg2cz_; |
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
# /etc/apache2/sites-enabled/001-dev.slovo.conf | |
<VirtualHost *:80> | |
ServerName dev.slovo.bg | |
ServerAdmin webmaster@dev.slovo | |
DocumentRoot /home/berov/opt/dev.slovo.bg | |
<Directory "/home/berov/opt/dev.slovo.bg"> | |
AllowOverride All | |
Require all granted | |
</Directory> |
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 | |
# I tried this even wth my system perl because I had installed modules there | |
# For this you need to be root, but beware you can break your system, | |
# if you have important scripts using some of these modules | |
# get list of installed modules via `cpanm` or `cpan` | |
export PERLLOCAL=`find "$1" -name 'perllocal.pod'` | |
# find and uninstall installed modules. cpanm will propt for each one | |
cpanm -U `perl -ne 'print "$1 " if /L\<([^\|]+)\|/' $PERLLOCAL` |
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 bash | |
# My notes - K. Berov: | |
# Copied from | |
# https://gist.githubusercontent.com/zmughal/8264712/raw/8831e421393143c5b48f22dcfa12eeda51c5cfbf/install-imagemagick-perl | |
# and modified for my self. | |
# I already have several perls | |
# I will use 5.26.2 for this installation | |
# See https://www.perl.com/article/57/2014/1/1/Shazam--Use-Image--Magick-with-Perlbrew-in-minutes/ | |
# See mainly the following as this configuration actually worked: | |
# https://github.com/lecstor/DevNotes/wiki/Image-Magick-with-Perlbrew |
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 Mojo -strict; | |
use Mojo::File qw(path); | |
# cd to the directory where your files are | |
# and run this program | |
# $0 $format_in $format_out | |
my ($format_in, $format_out) = @ARGV; | |
say qq|Converting from "$format_in" to "$format_out"|; | |
for my $file ( path('./')->list->each ) { |
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
fn largest<T: PartialOrd + Copy>(vec: &Vec<T>) -> T { | |
let mut largest = vec[0]; | |
for e in vec { | |
if e > &largest { | |
largest = *e; | |
} | |
} | |
largest | |
} | |
fn main() { |
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 FindBin; | |
use lib "$FindBin::Bin/../lib/perl5"; | |
use Mojo::Base -strict; | |
use Mojo::DOM; | |
use Mojo::File qw (path); | |
Mojo::Util::getopt \@ARGV, | |
'--input_folder|i=s' => \(my $in_folder = ''), | |
'--output_file|o=s' => \my $out_file, |
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
# |
NewerOlder