четверг, 6 июня 2019 г.

PS3 firmware update

INSTALLING THE CFW
  • Download the CFW at the top of the page. Rename the .PUP file exactly in: PS3UPDAT.PUP and compare the MD5 with the one you find at the top of the page! You can use the MD5sums Tool that you find online.
  • Take a USB formatted in FAT32, and create a new folder called PS3, inside it create another one called UPDATE, and inside this last insert the PS3UPDAT.PUP File, which would be the Custom Firmware.
  • Insert the USB into the rightmost port on the PS3. 
  • Be sure to : Remove any disc from the PS3 player, unmount any games loaded with any Manager, disable Internet connection.
From XMB
  • Simply go to the 'Settings' column, then 'System Update' and choose 'By storage media'.
  • Select the CFW and the process will start.
From Recovery

Enter Recovery:
  • Turn off the Console.
  • Switch on again by holding down the Power button until the console turns off again.
  • Now switch on again by holding down the Power button until you hear 2 Beeps close to each other.
  • At that point release the Power button!
In Recovery:
  • From the Recovery Menu now, select 'System Update'.
  • Just follow the instructions on the screen, and you're done!
For a clean installation, you can install the CFW twice. You can also go back to Recovery and choose the Options to Rebuild the Database and Restore the File System. This way you will have a more than clean and safe installation. Ok. You can choose to Install the CFW from the XMB or from Recovery.

As always, the sources of the Alexander developer will soon be available in his Github.
Read more at https://www.psxhax.com/threads/ferrox-ps3-custom-firmware-4-84-v1-00-cobra-7-55-by-alexander.6650/#rrv0KDCuX7OYEKhE.99

среда, 31 октября 2018 г.

lua & postgres

luarocks install luasql-postgres
luarocks install luasql-postgres PGSQL_INCDIR=/usr/include/postgresql/


#!/usr/bin/lua5.1
-- load driver
--require"luasql.postgres"
luasql = require "luasql.postgres"
-- create environment object
env = assert (luasql.postgres())
-- connect to data source
con = assert (env:connect('opensips','postgres','pass','localhost',5432))
-- retrieve a cursor
cur = assert (con:execute"SELECT * from  subscriber")
-- print all rows
row = cur:fetch ({}, "a")       -- the rows will be indexed by field names
while row do
  print(string.format("Username: %s, Msisdn: %s  \n", row.username, row.msisdn))
  row = cur:fetch (row, "a")    -- reusing the table of results
end
-- close everything
cur:close()
con:close()
env:close()

среда, 19 июля 2017 г.

Fast virtualhosts setup in debian

1)  Edit /etc/hosts , add new servernames like

10.10.10.20     site1.in.ua
10.10.10.20     site2.in.ua

2)  Make config file for every site in

/etc/apache2/sites-available/site1.in.ua.conf
/etc/apache2/sites-available/site2.in.ua.conf

example:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/site1.in.ua
        ServerName site1.in.ua
        ServerAlias www.site1.in.ua
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

3) For enable virtual hosts run :

sudo a2ensite site1.in.ua.conf
sudo a2ensite site2.in.ua.conf

4) restart apache2
 /etc/init.d/apache2 restart





NO Hibernation on WIN 7

1) Find file "cmd.exe"
2) Run "cmd.exe" in "administrator" mode
3) run "powercfg -h off"

четверг, 25 августа 2016 г.

time zone in linux Смена времени в линуксе

Можно долго настраивать  вручную коммандой:

# date +%T -s "10:13:13"

А можно быстро  выбрать timezone и время настроится автоматически:

dpkg-reconfigure tzdata

переключить время в 24 часовый формат
 
sudo localectl set-locale LC_TIME=en_GB.UTF-8

or

dpkg-reconfigure locales
---------------------------------------------------------------
timedatectl
timedatectl list-timezones

lrwxrwxrwx 1 root root 30 Aug 17 02:21 /etc/localtime -> /usr/share/zoneinfo/UTC
set

sudo ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
ln -sf /usr/share/zoneinfo/UTC  /etc/localtime

четверг, 21 июля 2016 г.

DHCP fast start

1) install:
apt-get install isc-dhcp-server
2)  edit:
vim /etc/dhcp/dhcpd.conf

ddns-update-style none;
ddns-domainname "example.com";
ignore client-updates;
option host-name = config-option server.ddns-hostname;


option domain-name              "example.com";
option domain-name-servers      10.10.10.2;
option time-offset              -18000; # Pacific Standard Time
option ntp-servers              10.10.10.1;
one-lease-per-client off;
default-lease-time 86400;
max-lease-time 604800;
option ip-forwarding off;


subnet 10.10.10.0 netmask 255.255.255.0 {
        range 10.10.10.100  10.10.10.200;
        next-server  10.10.10.1;
        option routers                  10.10.10.1;
        option subnet-mask              255.255.255.0;
        option ntp-servers              10.10.10.1;
        option tftp-server-name "https://10.10.10.1/provisioning/prov";

    }

3) restart
/etc/init.d/isc-dhcp-server restart
4) show for IP leases:
tail -f /var/lib/dhcp/dhcpd.leases

четверг, 31 марта 2016 г.

Apt-get in old debian version

1) watch your debian version here :

cat /etc/debian_version

2) Change your version here (such etch, squeeze  etc) :

vi /etc/apt/sources.list

deb http://archive.debian.org/debian/ squeeze main non-free contrib deb-src http://archive.debian.org/debian/ squeeze main non-free contrib 
deb http://archive.debian.org/debian-security/  squeeze/updates main non-free contrib deb-src http://archive.debian.org/debian-security/ squeeze/updates main non-free contrib


2) apt-get update