Bez kategorii « Różności …

Różności …

28 lipca 2019

Node.JS: Getting error : [nodemon] Internal watch failed: watch ENOSPC

Zaszufladkowany do: Bez kategorii — Jacek @ 14:59
sudo sysctl fs.inotify.max_user_watches=582222 && sudo sysctl -p
https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc

16 lipca 2019

Ubuntu 18.04 – after install

Zaszufladkowany do: Bez kategorii — Jacek @ 16:25

https://www.youtube.com/watch?v=qTsPLCJdbJw

apt install terminator

19 czerwca 2019

Maximize and unmaximize a window

Zaszufladkowany do: Bez kategorii — Jacek @ 09:33

You can maximize a window to take up all of the space on your desktop and unmaximize a window to restore it to its normal size. You can also maximize windows vertically along the left and right sides of the screen, so you can easily look at two windows at once. See Tile windows for details.

To maximize a window, grab the titlebar and drag it to the top of the screen, or just double-click the titlebar. To maximize a window using the keyboard, hold down the Super key and press , or press Alt+F10.

To restore a window to its unmaximized size, drag it away from the edges of the screen. If the window is fully maximized, you can double-click the titlebar to restore it. You can also use the same keyboard shortcuts you used to maximize the window.

https://help.ubuntu.com/stable/ubuntu-help/shell-windows-maximize.html.en

Keyboard shortcut for launching application from dock in Ubuntu 18

Zaszufladkowany do: Bez kategorii — Jacek @ 09:30
https://askubuntu.com/questions/1082772/keyboard-shortcut-for-launching-application-from-dock-in-ubuntu-18

Simply press and hold Super+Q. You should see numbers appearing next to the application icons. Then release Q and press the number associated to your target application to launch it.

You can alternatively press Super+number directly to launch the application without pressing Super+Q first.

Notes:

  1. If pressing Super+Q fails to show the numbers, run the following command first.
    gsettings set org.gnome.shell.extensions.dash-to-dock hot-keys false
    
  2. This shortcut only works with the keyboard’s top row number keys, not those of the numpad. You can install a GNOME shell extension called AppKeys to make it work with the numpad too.

Ubuntu 18 workspaces shortcuts

Zaszufladkowany do: Bez kategorii — Jacek @ 09:25

The only way I have found to modify the keyboard shortcuts for workspaces 5 and up in GNOME Flashback, is through a shell using the dconf command.

$ dconf read /org/gnome/desktop/wm/keybindings/switch-to-workspace-1
['<Primary>F1']

Here I read the shortcut setting for the first workspace, to get an idea about the syntax to use when setting values for the missing shortcuts. I’m using CTRLF1 myself.

To add shortcuts for the remaining workspaces, just modify the value returned above to match the workspace number, and use dconfto apply them:

$ dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['<Primary>F5']"
$ dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['<Primary>F6']"

https://askubuntu.com/questions/332264/13-04-more-than-four-workspace-shortcuts-in-gnome-flashback-no-effects


	

17 czerwca 2019

mount crypto_luks

Zaszufladkowany do: Bez kategorii — Jacek @ 15:59

https://evilshit.wordpress.com/2012/10/29/how-to-mount-luks-encrypted-partitions-manually/

blkid | grep crypto
cryptsetup luksOpen /dev/sda2/ crypthome
mkdir /mnt/crypthome && mount /dev/mapper/crypthome /mnt/crypthome
unknown lvm2_member
https://www.svennd.be/mount-unknown-filesystem-type-lvm2_member/
lvmdiskscan
lvscan
You used the exact same name (ubuntu-vg) for your new volume group as the old volume group. You must give them unique names. You can rename one of the groups using vgrename and its UUID.

Find the UUID with vgdisplay and then rename the volume group:
vgrename <VG UUID> new_name


  • root@svennd:~# fdisk -l /dev/sdd
  • Disk /dev/sdd: 233.8 GiB, 251000193024 bytes, 490234752 sectors
  • Units: sectors of 1 * 512 = 512 bytes
  • Sector size (logical/physical): 512 bytes / 512 bytes
  • I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Disklabel type: dos
  • Disk identifier: 0x0009345d
  • Device Boot Start End Sectors Size Id Type
  • /dev/sdd1 * 63 208844 208782 102M 83 Linux
  • /dev/sdd2 208845 488247479 488038635 232.7G 8e Linux LVM
(/dev/sdi1 is /boot partition, /dev/sdi2 is where the /home data resides) Seems lvm2 tools also provide a way to check if it is lvm or not, using lvmdiskscan (/dev/sdd2 here)
  • root@svennd:~# lvmdiskscan
  • /dev/sdb1 [ 1.82 TiB]
  • /dev/sdc2 [ 149.04 GiB]
  • /dev/sdd1 [ 101.94 MiB]
  • /dev/sdd2 [ 232.71 GiB] LVM physical volume
  • 0 disks
  • 4 partitions
  • 0 LVM physical volume whole disks
  • 1 LVM physical volume
Fine, now let’s scan what lv’s are to be found using lvscan
  • root@svennd:~# lvscan
  • inactive '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • inactive '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
Since this is an old disk in an enclosure, it is not activated on system boot. So we need to “activate” this lvm volume.
  • root@svennd:~# vgchange -ay
  • 2 logical volume(s) in volume group "VolGroup00" now active
and bam, ready to mount :
  • root@svennd:~# lvscan
  • ACTIVE '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
now to mount :
  • mount /dev/VolGroup00/LogVol00 /mnt/disk
success !

27 marca 2019

GRUB repair

Zaszufladkowany do: Bez kategorii — Jacek @ 13:44

GRUB repair

11 listopada 2017

atom shortcuts

Zaszufladkowany do: Bez kategorii — Jacek @ 11:06

ctrl + zaznaczenie  – wielokrotne wpisywanie

Ctrl + Shift + D - powielenie linii
Ctrl + Up (or Down) Arrow - przesunięcie linii

Ctrl + D - wielokrotne zaznaczenie tekstu

Alt + F3 - select all maching characters

30 grudnia 2016

Android emulator

Zaszufladkowany do: Bez kategorii — Tagi: — Jacek @ 15:02

Cannot launch AVD in emulator.
Output:
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

locate libstdc++.so.6

9 sierpnia 2016

Spring and Hibernate but non-Maven project (working in NetBeans), where java.lang.ClassNotFoundException: org.jboss.jandex.IndexView:

Zaszufladkowany do: Bez kategorii — Jacek @ 15:58

In the context of a Spring and Hibernate but non-Maven project (working in NetBeans), where java.lang.ClassNotFoundException: org.jboss.jandex.IndexView:

Add jandex-2.0.0Final.jar (or whatever version works) to your Library. — In a Maven project likely similarly – add it as a dependency

http://stackoverflow.com/questions/29744915/how-to-setup-jpa-project-with-hibernate

3 czerwca 2014

Solaris – Weblogic

Zaszufladkowany do: Bez kategorii — Jacek @ 21:50

Installation.

Installation2.

java    -d64    -Xmx1024m   -jar    wls1033_generic.jar
quickstart
MW_HOME/utils/quickstart/quickstart.sh
MW_HOME = /export/home/oracle/Oracle


jdeveloper – weblogic – not found jrockit
I fixed it by add to top of c:\users{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\setDomainEnv.cmd:
set SUN_JAVA_HOME=E:\Oracle\Java\jdk1.6.0_37
set JAVA_VENDOR=Sun

7 maja 2014

JOINS

Zaszufladkowany do: Bez kategorii,SQL — Tagi: — Jacek @ 07:43

references = foreign key

equijoin = inner join

21 lutego 2014

Set operators.

Zaszufladkowany do: Bez kategorii — Jacek @ 07:08

20 lutego 2014

subquery

Zaszufladkowany do: Bez kategorii — Jacek @ 06:09

Multiple row operators

SELECT last_name, salary, department_id
FROM
employees
WHERE salary IN (SELECT
MIN(salary)
FROM
employees
GROUP BY department_id);



13 grudnia 2013

Unity shortcuts

Zaszufladkowany do: Bez kategorii — Jacek @ 16:03

List of Ubuntu Unity Keyboard shortcuts

Launcher

  • Super — Invoke the Launcher.
  • Super-1 or 2 or 3 and so on until 0 — Open or focus an application.
  • Super-T — Open the rubbish bin.
  • Alt-F1 — Put keyboard focus on the Launcher.
  • Alt-F2 — Invoke the Dash in a “special mode” to run a command.
  • Ctrl-Alt-T — Launch a terminal window.

Dash

  • Super (tap) — A tap opens the Dash
  • Super-A — Open Applications place
  • Super-F — Open Files & Folders place

Panel

  • F10 — Open the first menu on the panel

Window Management

  • Super-? — Spread mode, zoom out on all windows in all workspaces.
  • Super-? — Spread mode, zoom out on all windows in current workspace.
  • Super-D — Minimize all windows; hitting it again restores them.

Window Placement

If you cycle through the same key Unity will cycle through different placement widths, so experiment by hitting the numkey multiple times, for example Ctrl-Alt-numpad 5 5 5:

  • Ctrl-Alt-Numpad 7 — Place window in top left corner of screen.
  • Ctrl-Alt-Numpad 8 — Place window in top half of screen.
  • Ctrl-Alt-Numpad 9 — Place window in top right corner of screen.
  • Ctrl-Alt-Numpad 4 — Place window on the left side of the screen.
  • Ctrl-Alt-Numpad 5 — Center/Maximize the window in the middle of the screen.
  • Ctrl-Alt-Numpad 6 — Place window on the right side of the screen.
  • Ctrl-Alt-Numpad 1 — Place window in the bottom left corner of the screen.
  • Ctrl-Alt-Numpad 2 — Place window in the bottom half of the screen.
  • Ctrl-Alt-Numpad 3 — Place window in the bottom right corner of the screen.
  • Ctrl-Alt-Numpad 0 — Maximize window.

Workspace Management

  • Super-W or Super-E — Expo mode, zooms out on all the workspaces and let’s you manage windows.
  • Ctrl-Alt-? / ? / ? / ? — Change to a new workspace.
  • Ctrl-Alt-Shift-? / ? / ? / ? — Place window to a new workspace.

Mouse Tricks

  • Maximizing — Dragging a window to the top panel will maximize it.
  • Middle click on Maximize — Maximize Window Vertically.
  • Left click on Maximize — Maximize Window Horizontally
  • Tiling — Dragging a Window to the left/right border will auto tile it to that side of the screen.
  • Restoring — Dragging the top panel down on a maximized window will restore it to its original size.
  • Middle click on an application’s launcher icon — Open a new instance of the application in a new window. If the application isn’t running it will just open it normally.
  • Middle click on the top panel (but not the menu) — send the current window behind all other windows.
  • Middle click on Maximize — Maximize Window Vertically.
  • Right click on Maximize — Maximize Window Horizontally.

Alt-Spacja Otwiera menu aktywnego okna

https://help.ubuntu.com/community/KeyboardShortcuts

trl + Alt + Left/Right Cursor Spins the ‘cube’ that your workspaces reside on, allowing you to select the workspace you wish to use.
Ctrl + Alt + Up Cursor Enables an ‘expose’ like feature that presents you with all the windows you currently have open, allowing you to select the one you wish to give focus to.
Ctrl + Alt + Down Cursor Unfolds your workspace cube allowing you to see more than one of your workspaces at once, using the left and right cursor keys with this active will allow you to select the workspace you wish to use.
Ctrl + Alt + Tab Switch between currently-open windows across all workspaces.
Super + W Enables the ‘scale’ effect, it shows all windows from the current workspace.
Super + A Enables the ‘scale’ effect, it shows all windows from all workspaces.
Super + N Invert colours of the focused window.
Super + M Invert colours for the whole screen.
Super + Mouse Scroll Wheel Zooms in on the screen.
Super + Middle Mouse Button Select a region to zoom into, using a rectangle.
Ctrl + Super + D Toggles ‘Show Desktop’.
Alt + Middle Mouse Button Resize focused window.
Alt + Left Mouse Button Move focused window.
Alt + Right Mouse Button Show window menu.
Super + S Zoom out, show workspace switcher

14 listopada 2013

VMware tools, CentOS 6.4

Zaszufladkowany do: Bez kategorii — Jacek @ 11:22

Source:
http://mondotech.blogspot.com/2012/05/install-vmware-tools-on-rhel-6-centos-6.html

This is a HOWTO for installing VMware Tools on RHEL 6 and Centos 6.  I’m mainly posting this since I never remember what the prerequisites are.

Install the VMware tools prerequisites:

yum install make gcc kernel-devel kernel-headers glibc-headers perl

Mount the VMware Tools CD (after inserting it into the VM)

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

Copy the install bundle from the CD and extract it.

cp /mnt/cdrom/VMware-Tools*.tar.gz /tmp/
cd /tmp/
tar xvfz VMwareTools*.tar.gz

Run the installer, default on all prompts works fine.

cd /tmp/vmware-tools-distrib
./vmware-install.pl  # add -d to auto accept defaults

12 września 2013

Jazda bez trzymanki :-)

Zaszufladkowany do: Bez kategorii — Jacek @ 11:00

21 kwietnia 2012

Pamir

Zaszufladkowany do: Bez kategorii,Z sieci — Tagi: — Jacek @ 17:58

16 grudnia 2011

Motocykle …

Zaszufladkowany do: Bez kategorii,Z sieci — Tagi: — Jacek @ 14:45

Crossing Mongolia

Iran

18 listopada 2011

Oracle licensing – vmware.

Zaszufladkowany do: Bez kategorii,Oracle — Tagi: — Jacek @ 17:06

Oracle licensing:

http://weinshenker.net/blog/2011/04/03/licensing-oracle-vmware-vsphere/

http://oraclestorageguy.typepad.com/oraclestorageguy/2010/05/oracle-license-costs-on-the-vmware-vsphere-platform.html

Oracle partitioning document:

http://www.oracle.com/us/corporate/pricing/partitioning-070609.pdf

Hard Partitioning with Oracle VM

VM TO HOSTS AFFINITY RULE:

http://frankdenneman.nl/2010/07/vm-to-hosts-affinity-rule/

vSphere Resource Management Guide

Strona startowa: www.jaceksen.pl