Monday, November 30, 2015

Git: check if something to pull

git remote -v update

Tuesday, November 24, 2015

PostgreSQL: see number of connections

select sum(numbackends) from pg_stat_database;

Sunday, November 15, 2015

Windows: change desktop icon size

  1. Using the left click of the mouse, click on an empty area in the desktop. This step is to make sure that there is no application selected/clicked on. 
  2. Using your keyboard, press and keep holding the CTRL button, then using your mouse wheel, roll it upward to make the icons size larger, or downward to set the icon size smaller

Virtualbox centos: Device eth0 does not seem to be present

If, when copying a VM from one computer to another one, you face this error:
service network restart
...
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

Then ensure first that /etc/sysconfig/network-scripts/ifcfg-eth0 has the same MAC address as in Virtualbox network settings, plus
rm /etc/udev/rules.d/70-persistent-net.rules
and reboot

Cisco AnyConnect - Adding Multiple VPN Devices to the Client

See http://www.petenetlive.com/KB/Article/0001011.htm
  • Windows: vi C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\profile\Profile.xml
  • MacOS: vi /opt/cisco/anyconnect/profile/Profile.xml

 
  false
  true
  false
  All
  false
  Native
  true
  12
  false
  true
  true
  true
  true
   DisconnectOnSuspend
  
  true
  Automatic
  SingleLocalLogon
  LocalUsersOnly
  false
  Disable
   
  
  false
  false
   20
   4
  
  false
  
 
 
  
   My entry #1
   my_entry1.com
  
  
   My entry #2
   my_entry2.com
  
 

Wednesday, November 4, 2015

PostgreSQL: epoch to date

select to_timestamp(1446631729) at time zone 'UTC';

Monday, November 2, 2015

Git: show files not yet pushed

git diff --numstat origin/master