Ярлыки

Показаны сообщения с ярлыком Ubuntu. Показать все сообщения
Показаны сообщения с ярлыком Ubuntu. Показать все сообщения

понедельник, 17 марта 2014 г.

curl - measure time

curl -o /dev/null -s -w %{time_total}\\n -X POST http://localhost:7474/db/data/ext/GetAllGoods

Disable second video adapter every time your computer boots (Ubuntu)

The commands in rc.local are executed every time your computer boots.
So you just need to add the commands that power down the discrete adapter right before you chown the vgaswitcheroo/switch file
I turn off my radeon adapter every time I boot as well. My rc.local is very simple:
# [...]
# By default this script does nothing.

# turn off the discrete video adapter
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

exit 0
I don't bother with any other scripts, but if you do they should still work just fine. Just put the echo OFF before the chown or any of the other user scripts.
Ubuntu has hibernation turned off by default, but note that if you do turn it on this method doesn't get a chance to run when you come out of hibernation (not sleep) so both adapters will be powered up.

maintenance wifi in DELL on Ubuntu

apt-get install bcmwl-kernel-source

Paste together two pdf files

pdftk titul.pdf Chapter1.pdf Chapter2.pdf Chapter3.pdf output wholeBook.pdf

воскресенье, 16 марта 2014 г.

Use notification in Ubuntu

Use crontab and notify-send:
EDITOR=gedit crontab -e
Add schedule:
15 12 * * 1-5 DISPLAY=:0.0 notify-send --urgency normal -i typing-monitor “Lunch” “Lunch”
15 17 * * 1-5 DISPLAY=:0.0 notify-send --urgency normal -i ktip “End of work day” “go home”
Save and close.

воскресенье, 19 января 2014 г.

понедельник, 18 марта 2013 г.

суббота, 3 ноября 2012 г.

cancel autohide launcher panel on Ubuntu Unity 2D


I take this from gere: http://pingvinus.ru/note/unity-2d-launcher-autohide

1) installing dconf:
sudo apt-get install dconf-tools
2) list of available options:
dconf list /com/canonical/unity -2d/launcher/

in result:
hide-mode
super-key-enable
use-strut

3) always show panel (set use-strut=true):
dconf write /com/canonical/unity-2d/launcher/use-strut true

4) logout - login for show panel


restore autohide:
dconf write /com/canonical/unity-2d/launcher/use-strut 0

четверг, 25 октября 2012 г.

Installing OracleClient11g on UbuntuServer

It's did by this instruction: http://www.gena01.com/forum/gena01-blog/oracle-instant-client-11g-on-ubuntu/

I did follow:

1. Installling libaio1 (must for Oracle 11g, optional for 10):
apt-get install libaio1

2. Installing alien:
apt-get install alien


3. Downloading RPMs from here:
http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

4. RPMs converting into .deb through alien:
alien [download_file.rpm]

5. Installing debian-package:
dpkg -i [file_from_paragraph_4.deb]
 
6. And finally, doing this command:

aptitude search oracle
And we must see: 


p   cl-sql-oracle                                                          - CLSQL database backend, Oracle
p   libmono-oracle1.0-cil                                                  - Mono Oracle library
p   libmono-oracle2.0-cil                                                  - Mono Oracle library
i   oracle-instantclient11.1-basic                                         - Instant Client for Oracle Database 11g
i   oracle-instantclient11.1-devel                                         - Development headers for Instant Client.
i   oracle-instantclient11.1-sqlplus                                       - SQL*Plus for Instant Client.
p   spamoracle                                                             - A statistical analysis spam filter based on Bayes' formula
p   spamoracle-byte                                                        - A statistical analysis spam filter based on Bayes' formula

Install Django on UbuntuServer

How I installed Django on UbuntuServer 11.04 - the Natty Narwhal
python2
django1.3

Apache already installed. 

Installing apxs2: 
 sudo apt-get install apache2-threaded-dev

Installing mod_python-3.3.1:
sudo apt-get install libapache2-mod-python

stop Apache:
sudo /etc/init.d/apache2 stop

Than we write settings in Apache config file (for me - /etc/apache2/apache2.conf). This settings bind Django with URL:
#Connect to mod_python:
LoadModule python_module /usr/lib/apache2/modules/mod_python.so

#Connect Django with URL:
<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE settings
    PythonDebug Off
    PythonPath "['/home/vinger4/vinger4site','/usr/local/lib/python3.2/dist-packages/django'] + sys.path"
    PythonAutoReload Off
</Location>

Correcting urls.py and settings.py
You must delete prefix of you site (in my case - vinger4site), because it wrote in PythonPath for Apache (please, see previous paragraph).

start Apache
sudo /etc/init.d/apache2 start

Now each request to the server must go through Apache.