Archivo de la categoría: Sysadmin

Postgres: file -> Bytea

Antes que nada, creamos una tabla en la Base de datos:

prueba=# create table archivo (Id serial, Nombre varchar(20), Tipo varchar(20), Contenido bytea, primary key (Id));

Luego hay que crear un formulario sencillo HTML:

 <form action="dato_image.php" method="post" enctype="multipart/form-data">
        <table>
           <tr> <td>
               <label for="archivo">Busque El archivo</label> </td>
               <td>
               <input type="file" name="archivo" size="20"> </td></tr>
            <tr><td>
                <input type="submit" value="cargar archivo"></td></tr></table>    </form>
Seguir leyendo Postgres: file -> Bytea

Owncloud 10 fixing warnings

No memory cache has been configured

This issue can take a bit more time and decision making based on what memory cache you use. It is all well documented here. In my case I went with the recommended APCu solution. First I installed APCu with

sudo apt-get install php-apcu

Then you should restart your web server, with the first line below. Then you ned to go and edit the config file config.php which lives in /var/www/owncloud/config adding ‘memcache.local’ => ‘\OC\Memcache\APCu’,.

sudo service ngnix restart
Transactional file locking should be configured to use memory-based locking, not the default slow database-based locking.

This is also documented in the link for first issue. You need to install Redis like so

sudo apt-get install redis-server php-redis

Then to the config you need to add the following lines:

  'redis' => [
  'host' => 'localhost',
  'port' => 6379,
],
  'memcache.locking' => '\OC\Memcache\Redis',

some resources

https://www.w3schools.com/CSSref/tryit.asp?filename=trycss_overflow
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe_scrolling

—————–Fonts——————————–
https://fonts.google.com/specimen/Iceland?selection.family=Iceland
https://fonts.google.com/specimen/Graduate

—————tracker—————————-
https://hackernoon.com/build-a-cryptocurrency-price-tracker-in-5-minutes-d66c3d37ad71

—————–Theme xfce———————-
https://www.xfce-look.org/p/1240075/

Using pyinotify to Monitor a Website and send alarms

Hello there now i will teach you how to monitor a website files to track and react to any type of events like a MOD or a DELETE or WRITE event in those files you can expand  the python code to make it better for example you can create a routine that writes the log into a file this way the tutorial wont require stdbuf for sending output to the log anyways here we go hope it helps you:

Seguir leyendo Using pyinotify to Monitor a Website and send alarms