Debian Locale problem Kategoria: Linux | Tagi: debian | Autor: Bartłomiej Gałęzia

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = (unset),
        LC_TIME = "pl_PL.UTF-8",
        LC_MONETARY = "pl_PL.UTF-8",
        LC_ADDRESS = "pl_PL.UTF-8",
        LC_TELEPHONE = "pl_PL.UTF-8",
        LC_NAME = "pl_PL.UTF-8",
        LC_MEASUREMENT = "pl_PL.UTF-8",
        LC_IDENTIFICATION = "pl_PL.UTF-8",
        LC_NUMERIC = "pl_PL.UTF-8",
        LC_PAPER = "pl_PL.UTF-8",
& nbsp;       LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory

 

Rozwiązanie:

dpkg-reconfigure locales

Debian 10

sudo dpkg-reconfigure locales

Mod_perl apache install Kategoria: Linux | Tagi: perl | Autor: Bartłomiej Gałęzia

https://www.debian-administration.org/article/635/A_brief_introduction_to_mod_perl_-_Part_1

apt-get install libapache2-mod-perl2
a2enmod perl
/etc/init.d/apache2 restart

 

http://www.livejournal.com/doc/server/lj.install.perl_setup.modules.html

https://packages.debian.org/squeeze/libapache-dbi-perl

aptitude install libapache-dbi-perl
aptitude install libio-compress-perl
aptitude install libxml-simple-perl
aptitude install libnet-ip-perl
aptitude install libsoap-lite-perl
cpan> install Apache2::SOAP
/usr/bin/perl -mApache2::SOAP

http://wiki.ocsinventory-ng.org/index.php/Howtos:Install_OCS_on_debian

jQuery chosen + validation Kategoria: PHP | Autor: Bartłomiej Gałęzia

Domyślnie skrypt Chosen pomija elementy z atrybutem 'hidden'.

Rozwiązanie:
$.validator.setDefaults({ ignore: ":hidden:not(select)" })


http://stackoverflow.com/questions/11232310/how-can-i-use-jquery-validation-with-the-chosen-plugin


PHP usuwanie wszystkich znaków poza liczbami Kategoria: PHP | Autor: Bartłomiej Gałęzia

Jak wyłączyć komentarze na stronach - wordpress Kategoria: WWW | Tagi: wordpress | Autor: Bartłomiej Gałęzia

usuń:

<?php comments_template(); ?>

w pliku

page.php

Linux Magazine – 11/2014 (129) Kategoria: Linux Magazine | Autor: Bartłomiej Gałęzia

AFWall+ - firewall na androida s.29
SIAB (Shell in a box) - ssh przez www s.40
Deepin - nowe środowisko graficzne do linuxa s.42
Rescatux - naprawa gruba, reset haseł, naprawa systemów plików s.50
Sztuczki z bashem - ciekawe zastosowania s.58
Dillinger, Caret - edytory tekstów ze znacznikami s.77
Audex - cd ripper s.84

Remote shutdown linux - linux Kategoria: Linux | Autor: Bartłomiej Gałęzia

ssh-keygen
ssh-copy-id -i /root/.ssh/id_rsa.pub 10.12.13.14
ssh root@10.12.13.14 "poweroff"

Linux Magazine – 10/2014 (128) Kategoria: Linux Magazine | Autor: Bartłomiej Gałęzia

Części do Raspberry PI - s. 11
Google maps na linuxy - s. 42

Generowanie sum MD5 Kategoria: Windows | Tagi: md5 | Autor: Bartłomiej Gałęzia

Linux Magazine – 09/2014 (127) Kategoria: Linux Magazine | Autor: Bartłomiej Gałęzia

Systemy plików porównanie – ext3, ext4, xfs, btrfs – s.18

Porównanie sytemów ERP i CRM – s.36

Google translate CLI – s.58

Pinger, testowanie sieci przez ping, mierzenie długości kabli – s.60

Linux Magazine – 08/2014 (126) Kategoria: Linux Magazine | Tagi: do poprawki | Autor: Bartłomiej Gałęzia

Cygwin – uruchamianie aplikacji z linuxa na windowsie – s.13

TheSSS – najmniejszy serwer na świecie, http, ftp, ssh, telnet – s.27

Nmon – narzędzie do monitorowania ruchu sieciowego, cpu, dysku itp – s.28

Parametry Rsynca – s.41



Crystal disk mark – benchmark hdd ssd – s.42



Miniflux – czytnik RSS online – s.55

Bash History Suggest Box, rozbudowane narzędzie do przeglądania historii bash – s.56

Inxi – system info rozbudowany – s.72

Multitail – tail z menu i podziałem na okna – s .74

Codeigniter cron job Kategoria: Codeigniter | Tagi: cron | Autor: Bartłomiej Gałęzia

http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/

Create a file (e.g. cron.php) in the same place as your index.php and system folder. Here is its code:

Zobacz całość

Naprawa grub 2.0 po instalacji win7 Kategoria: Linux | Tagi: grub | Autor: Bartłomiej Gałęzia

https://help.ubuntu.com/community/Boot-Repair

1st option : get a CD including Boot-Repair

The easiest way to use Boot-Repair is to burn one of the following disks and boot on it.

Remark : you can also install the ISO on a live-USB (eg via UnetBootin or LiliUSB or Universal USB Installer).

2nd option : install Boot-Repair in Ubuntu

- either from an Ubuntu live-session (boot your computer on a Ubuntu live-CD or live-USB then choose „Try Ubuntu”) or from your installed Ubuntu session (if you can access it)

- connect to the Internet

- open a new Terminal, then type the following commands (press Enter after each line):

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
boot-repair

Alternatywne rozwiązanie

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

sudo fdisk -l
sudo 
mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda
grub-install --recheck /dev/sdX
update-grub
exit && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt
reboot

Jak nie zadziała to spróbujcie to : http://askubuntu.com/questions/145241/how-do-i-run-update-grub-from-a-livecd

Linux Magazine – 07/2014 (125) Kategoria: Linux Magazine | Autor: Bartłomiej Gałęzia

Programowanie reaktywne, język elm, s.17

http://www.elm-lang.org/

SEC, simple event correlator, analizowanie logów s.43

Zabbix zamiast nagiosa, instalacja wymagania s.49

Netrw, szybkie przesyłanie po sieci, netwrite, netread  s.55

http://mamuti.net/netrw/index.en.html

Tripwire, śledzenie zmian w systemie s.66

http://sourceforge.net/projects/tripwire/

Linux Remote Control, sterowanie linuxem z poziomu androida s.70

http://www.linuxremotecontrol.com/index-en.html

https://play.google.com/store/apps/details?id=net.rbaron.remotecontrollite

Tree zamiast ls, lepsze przeglądanie plików, s.84

Jquery - sztuczki Kategoria: jQuery | Autor: Bartłomiej Gałęzia

powiększenie wartości atrybutów css o 1

$('#ground').css('left', function(index, value) {
                return parseInt(value) + 1;
            })

ustalenie wielu wartości w css na raz

$('#ground').css({
                left: 100, 
                top: 100
            })

animacja jedna po drugiej

$('#ground').animate({left: 100}).animate({top: 100});

dwie animacje na raz

$('#ground').animate({left: 100, top: 100});

albo

$('#ground').animate({left: 100}).animate({top: 100},{queue: false});

albo

$('#ground').animate({left: 100}).animate({top: 100}).dequeue();

zatrzymanie animacji

$('#ground').stop();

czyszczenie kolejki animacji

$('#ground').clearQueue();

opóźnienie

$('#ground').fadeIn().delay(2000).fadeOut();

bind - obsługa zdarzeń ale tylko dla elementów które są już na stronie w momencie wywołania kodu

$('#ground').bind('click', function() {
                alert("Clicked")
            });

robi to samo co to

$('#ground').click(function() {alert("Clicked")});

delegate - działa tak jak bind ale też dla potomnych

$('#world').delegate('#ground', 'click', function() {
                alert("Clicked")
            });

usuwanie obsługi zdarzeń

.unbind()
.undelegate()

w jquery 1.7 bind i delegate zastąpione przez

.on()
.off()

przypisanie wartości do obiektu. http://ejohn.org/blog/html-5-data-attributes/

$('#ground').data('iloscZyc' , 5);

remove() - usuwa element. detach() - usuwa element ale pozwala go później przywrócić.

definiowanie przestrzeni nazw

var cocktail = {};
cocktail.shake = function (){...}
ncocktail.stir = function (){...}

albo

var cocktail = {
shake: function (){...}
stir: function (){...}
};