Skip to content

Instantly share code, notes, and snippets.

@vladpurga
vladpurga / electromagnetic-waves-pure-css.markdown
Created October 3, 2017 05:28
Electromagnetic Waves - Pure CSS
@vladpurga
vladpurga / api-integration-testing.yml
Created December 1, 2017 16:47 — forked from rgwozdz/api-integration-testing.yml
Psuedo Ansible Playbook for API/DB integration testing - Mocha.js, Express.js, PostgreSQL
- name: Run DB/API integration test suite
hosts: localhost
become: True
become_method: sudo
tasks:
- name: Use PSQL to Close Postgres DB connection to the master database
become: True
become_user: postgres
@vladpurga
vladpurga / truncate.cron
Created July 17, 2018 08:50
truncate zabbix /tmp/test.log every hour
0 * * * * truncate /tmp/test.log --size 0
# /var/spool/cron/crontabs/
sudo find /opt/chroot/*/*/var/spool/cron/crontabs -type d
@vladpurga
vladpurga / initramfs-fsck.md
Last active September 14, 2018 08:17
read only file system fix

fix virtual machine

virsh destroy --graceful <vm-name>
virsh start --console <vm-name>
e
linux ... init=/bin/bash
Ctrl+X
(initramfs) fsck -y /dev/vda1
reboot -f
root$ mount -o remount,rw /
$ sudo dmidecode | grep -A4 'Base Board'
Base Board Information
   Manufacturer: Gigabyte Technology Co., Ltd.
   Product Name: GA-MA69VM-S2
   Version: x.x
   Serial Number: 

edit /etc/default/console-setup to set the Terminus Bold font

ACTIVE_CONSOLES="/dev/tty[1-6]"
CHARMAP="UTF-8"
CODESET="guess"
FONTFACE="TerminusBold"
FONTSIZE="16x32"
SCREEN_WIDTH="80"

```sql
-- https://stackoverflow.com/questions/25413303/how-to-list-files-in-a-folder-from-inside-postgres
-- Unfortunately that variant only allow use hardcoded path
-- To use user parameter we will use dynamic EXECUTE.
-- Return also file size and allow filtering
--
-- @param path text. Filesystem path for read to
-- @param filter text (default null meaning return all). Where condition to filter files. F.e.: $$filename LIKE '0%'$$

Ubuntu 18.04 Changes after installing

behavior of left Alt key

$ sudo kbd_mode
The keyboard is in Unicode (UTF-8) mode

$ sudo kbd_mode -s
$ sudo kbd_mode