Air tickets sites

September 25, 2016 Travel No comments

https://www.skyscanner.net/

http://www.fluege.de/

https://www.amadeus.net

Understanding ECMAScript 6

September 24, 2016 Javascript No comments

ES6 more details : https://leanpub.com/understandinges6/read

install C/C++ compilers on linux (deb)

September 23, 2016 C/C++, Linux No comments

install C/C++ compilers:

sudo apt-get update
sudo apt-get install build-essential

install mysql library for C/C++:
sudo apt-get install libmysqlclient-dev

(more…)

git: pull and overwrite all your local changes

September 23, 2016 Git No comments

git fetch --all
git reset --hard origin/master

instead of master branch you can use your custom branch name:
git reset --hard origin/your_branch

source: http://stackoverflow.com/questions/1125968/how-to-force-git-pull-to-overwrite-local-files

kill all the processes of a program

September 23, 2016 Linux, Servers config/admin No comments

kill $(ps aux | grep 'chrome' | awk '{print $2}')
where chrome – is the application you want to kill

mount a remote folder on local machine via SSH

September 23, 2016 Linux, Servers config/admin No comments

1. install sshfs:
sudo apt-get install sshfs
More details here: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

2. mount the  ssh location:
sshfs -o nonempty user@ip:/var/www/test /home/testuser/testdirectory

to unmount it:
fusermount -u /home/testuser/testdirectory

where:
user – your SSH user
ip – IP of your remote machine
/var/www/test – path of the directory on your remote server which you want to mount on your local machine
/home/testuser/testdirectory – path of mounted remote directory on your local machine

ubuntu ssh disable root login using password

September 22, 2016 Linux, Servers config/admin No comments

1. make sure .ssh/ folder has the write permissions 700:
chmod 700 .ssh
2. the file .ssh/authorized_keys should have the write permissions 600:
chmod 600 .ssh/authorized_keys
3. in the file /etc/ssh/sshd_config the line PermitRootLogin should be like this:
PermitRootLogin without-password
more details you can find here: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

ubuntu cronjob error “MIB search path”

December 30, 2014 cronjob, Linux, PHP, Servers config/admin No comments

running cronjobs (shell scripts) on Ubuntu 14.10  (using crontab -e) generate error: “MIB search path” and a list of errors like:


Cannot adopt OID inUCD-SNMP-MIB:dskUsedHigh::={dskEntry16}
Cannot adopt OID inUCD-SNMP-MIB:dskUsedLow::={dskEntry15}
Cannot adopt OID inUCD-SNMP-MIB:dskAvailHigh::={dskEntry14}
Cannot adopt OID inUCD-SNMP-MIB:dskAvailLow::={dskEntry13}
Cannot adopt OID inUCD-SNMP-MIB:dskTotalHigh::={dskEntry12}
Cannot adopt OID inUCD-SNMP-MIB:dskTotalLow::={dskEntry11}
Cannot adopt OID inUCD-SNMP-MIB:dskPercentNode::={dskEntry10}
Cannot adopt OID inUCD-SNMP-MIB:dskPercent::={dskEntry9}
Cannot adopt OID inUCD-SNMP-MIB:dskUsed::={dskEntry8}
Cannot adopt OID inUCD-SNMP-MIB:dskAvail::={dskEntry7}
Cannot adopt OID inUCD-SNMP-MIB:dskTotal::={dskEntry6}
Cannot adopt OID inUCD-SNMP-MIB:dskMinPercent::={dskEntry5}
Cannot adopt OID inUCD-SNMP-MIB:dskMinimum::={dskEntry4}
Cannot adopt OID inUCD-SNMP-MIB:dskDevice::={dskEntry3}
Cannot adopt OID inUCD-SNMP-MIB:dskPath::={dskEntry2}
Cannot adopt OID inUCD-SNMP-MIB:dskIndex::={dskEntry1}
Cannot adopt OID inUCD-DISKIO-MIB:diskIOTable::={ucdDiskIOMIB1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLoggingGroup::={nsConfigGroups2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsDebugGroup::={nsConfigGroups1}
Cannot adopt OID inUCD-SNMP-MIB:snmperrErrMessage::={snmperrs101}
Cannot adopt OID inUCD-SNMP-MIB:snmperrErrorFlag::={snmperrs100}
Cannot adopt OID inUCD-SNMP-MIB:snmperrNames::={snmperrs2}
Cannot adopt OID inUCD-SNMP-MIB:snmperrIndex::={snmperrs1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsTransactionTable::={nsTransactions1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogStatus::={nsLoggingEntry5}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogMaxLevel::={nsLoggingEntry4}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogType::={nsLoggingEntry3}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogToken::={nsLoggingEntry2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogLevel::={nsLoggingEntry1}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendResult::={nsExtendOutput1Entry4}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutNumLines::={nsExtendOutput1Entry3}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutputFull::={nsExtendOutput1Entry2}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutput1Line::={nsExtendOutput1Entry1}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutLine::={nsExtendOutput2Entry2}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendLineIndex::={nsExtendOutput2Entry1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyStart::={netSnmpNotifications1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyShutdown::={netSnmpNotifications2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyRestart::={netSnmpNotifications3}
Cannot adopt OID inUCD-SNMP-MIB:laErrMessage::={laEntry101}
Cannot adopt OID inUCD-SNMP-MIB:laErrorFlag::={laEntry100}
Cannot adopt OID inUCD-SNMP-MIB:laLoadFloat::={laEntry6}
Cannot adopt OID inUCD-SNMP-MIB:laLoadInt::={laEntry5}
Cannot adopt OID inUCD-SNMP-MIB:laConfig::={laEntry4}
Cannot adopt OID inUCD-SNMP-MIB:laLoad::={laEntry3}
Cannot adopt OID inUCD-SNMP-MIB:laNames::={laEntry2}
Cannot adopt OID inUCD-SNMP-MIB:laIndex::={laEntry1}

the problem is in the php5-snmp library/module. The easiest way to fix it – uninstall the module:

sudo apt-get remove php5-snmp

Symfony APIs bundles

November 2, 2014 PHP, Symfony No comments

1. https://github.com/schmittjoh/JMSSerializerBundle
Installation instructions: http://jmsyst.com/bundles/JMSSerializerBundle

2. https://github.com/FriendsOfSymfony/FOSRestBundle

3. https://github.com/nelmio/NelmioApiDocBundle

Atmel products

July 15, 2014 Microcontrollers No comments

AVRISP mkII

ATmega324A