Configure ppp/pppoe in FreeBSD with standart facility

[root@gw /]# cat /etc/ppp/ppp.conf | grep -v -e "^#"
default:
set log Phase tun command

isp-name:
set device PPPoE:rl0
set authname your_login
set authkey your_password
set dial
set login
add default HISADDR

[root@gw /]# ppp -ddial isp-name

Fix Master Mono problem on VIA KT600 integrated AC97 sound chip with snd_via82xx module

Сегодня по невыясненным причинам неожиданно пропало управление каналом Master Mono в микшере, звук был, но очень тихий. Попытки реинициализации не помогли, проблема оказалась в каком-то баге, при котором сбрасываются значения микшера VIA DXS:
user@callisto:~$ amixer | tail -28
Simple mixer control 'VIA DXS',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [-99999.99dB]
Front Right: Playback 31 [100%] [-99999.99dB]
Simple mixer control 'VIA DXS',1
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [-99999.99dB]
Front Right: Playback 31 [100%] [-99999.99dB]
Simple mixer control 'VIA DXS',2
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [-99999.99dB]
Front Right: Playback 31 [100%] [-99999.99dB]
Simple mixer control 'VIA DXS',3
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [-99999.99dB]
Front Right: Playback 31 [100%] [-99999.99dB]

user@callisto:~$ for ((n=0; n<=3; n++)); do eval amixer sset "VIA\ DXS",$n 0dB; done
Simple mixer control 'VIA DXS',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [0.00dB]
Front Right: Playback 31 [100%] [0.00dB]
Simple mixer control 'VIA DXS',1
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [0.00dB]
Front Right: Playback 31 [100%] [0.00dB]
Simple mixer control 'VIA DXS',2
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [0.00dB]
Front Right: Playback 31 [100%] [0.00dB]
Simple mixer control 'VIA DXS',3
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [0.00dB]
Front Right: Playback 31 [100%] [0.00dB]

Quick enable internal microphone on Sony Vaio VGN-FZ140E snd-hda-intel

user@laptop:/$ lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
user@laptop:/$ amixer cset numid=5,iface=MIXER,name='Capture Source' 1
numid=5,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Mic Jack'
  ; Item #1 'Internal Mic'
  ; Item #2 'PCM'
  : values=1
user@laptop:/$ amixer cset numid=4,iface=MIXER,name='Capture Switch' on
numid=4,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on

git fix commits messages

user@laptop:/mnt/sandbox/src/apstat$ git rebase -i c3e1531fe390a7867a36f283c0e161de2c424dce # parent
Rebasing (1/1)
You can amend the commit now, with

git commit --amend

Once you are satisfied with your changes, run

git rebase --continue

user@laptop:/mnt/sandbox/src/apstat$ git commit --amend apstat.py
Created commit 84a9cba: Fix: splitting and assigning cmd_list array in length check
1 files changed, 35 insertions(+), 39 deletions(-)
user@laptop:/mnt/sandbox/src/apstat$ git rebase --continue
Successfully rebased and updated refs/heads/master.
user@laptop:/mnt/sandbox/src/apstat$ git push --all origin
To git://git.yourdomain.ru/apstat.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'git://git.yourdomain.ru/apstat.git'
user@laptop:/mnt/sandbox/src/apstat$ git pull
Merge made by recursive.
user@laptop:/mnt/sandbox/src/apstat$ git push --all origin
Counting objects: 2, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 562 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
To git://git.yourdomain.ru/apstat.git
6713dac..c32e9c3 master -> master
user@laptop:/mnt/sandbox/src/apstat$ git log
commit c32e9c37fb8302466293691827347ce9f908f3f3
Merge: 84a9cba... 6713dac...
Author: author
Date: Thu Apr 15 03:44:16 2010 +0400

Merge branch 'master' of git://git.yourdomain.ru/apstat

commit 84a9cbad7cba7c0dd204d12cfa7fb02a1e4043db
Author: author
Date: Thu Apr 15 02:44:31 2010 +0400

Fixed commit

[skip]

Apache stress test

[root@gw /usr/src]# ab -kc 10 -t 30 http://yourdomain.ru/
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking yourdomain.ru (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Finished 28396 requests
Server Software:        Apache                                             
Server Hostname:        yourdomain.ru
Server Port:            80

Document Path:          /
Document Length:        12054 bytes

Concurrency Level:      10
Time taken for tests:   30.001 seconds
Complete requests:      28396
Failed requests:        0
Broken pipe errors:     0
Keep-Alive requests:    28118
Total transferred:      350832390 bytes
HTML transferred:       342297438 bytes
Requests per second:    946.50 [#/sec] (mean)
Time per request:       10.57 [ms] (mean)
Time per request:       1.06 [ms] (mean, across all concurrent requests)
Transfer rate:          11694.02 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0     0    0.7      0    60
Processing:     2    10    4.5     10   696
Waiting:        2    10    4.4     10   695
Total:          2    10    4.7     10   698

Percentage of the requests served within a certain time (ms)
50%     10
66%     10
75%     10
80%     10
90%     11
95%     11
98%     13
99%     20
100%    698 (last request)

watch hddtemp in screen

srv:/etc# screen -S hddtemp watch -n60 hddtemp /dev/sd{a,b,c,d}
[Ctrl a-d]
srv:/etc# screen -ls
There are screens on:
4446.hddtemp (14.04.2010 00:15:37) (Detached)
4439.sensors (14.04.2010 00:15:02) (Detached)
2 Sockets in /var/run/screen/S-root.
srv:/etc# screen -r hddtemp
Every 60,0s: hddtemp /dev/sda /dev/sdb /dev/sdc /dev/sdd MM DD HH:MM:SS YYYY
/dev/sda: ST380817AS: 27°C
/dev/sdb: ST3250824AS: 24°C
/dev/sdc: ST3250310AS: 27°C
/dev/sdd: ST3500630AS: 27°C

Recursively add file extension to all files

laptop:/srv# touch script{0..9}
laptop:/srv# ls
script0 script1 script2 script3 script4 script5 script6 script7 script8 script9
laptop:/srv# find . -type f -exec mv '{}' '{}'.sh \; ; ls
script0.sh script2.sh script4.sh script6.sh script8.sh
script1.sh script3.sh script5.sh script7.sh script9.sh
laptop:/srv# rm -f script* && touch script{0..9}
laptop:/srv# find . -type f -not -name "." -print0 | xargs -0 rename 's/(.)$/$1.sh/'; ls
script0.sh script2.sh script4.sh script6.sh script8.sh
script1.sh script3.sh script5.sh script7.sh script9.sh

mplayer keyboard shortcuts

<- and ->                               Seek backward/forward 10 seconds.
up and down                             Seek forward/backward 1 minute.
pgup and pgdown                         Seek forward/backward 10 minutes.
[ and ]                                 Decrease/increase current playback speed by 10%.
{ and }                                 Halve/double current playback speed.
backspace                               Reset playback speed to normal.
< and >                                 Go backward/forward in the playlist.
ENTER                                   Go forward in the playlist, even over the end.
HOME and END                            next/previous playtree entry in the parent list
INS and DEL (ASX playlist only)         next/previous alternative source.
p / SPACE                               Pause (pressing again unpauses).
.                                       Step forward. Pressing once will pause movie, every consecutive press will play one frame and then go into pause mode again (any other key unpauses).
q / ESC                                 Stop playing and quit.
+ and -                                 Adjust audio delay by +/- 0.1 seconds.
/ and *                                 Decrease/increase volume.
9 and 0                                 Decrease/increase volume.
( and )                                 Adjust audio balance in favor of left/right channel.
m                                       Mute sound.
_ (MPEG-TS and libavformat only)        Cycle through the available video tracks.
 
# (DVD, MPEG, Matroska, AVI and libavformat only) Cycle through the available audio tracks.
TAB (MPEG-TS only)                      Cycle through the available programs.
f                                       Toggle fullscreen (also see -fs). 
T                                       Toggle stay-on-top (also see -ontop).
w and e                                 Decrease/increase pan-and-scan range.
o                                       Toggle OSD states: none / seek / seek + timer / seek + timer + total time.
d                                       Toggle frame dropping states: none / skip display / skip decoding (see -framedrop and -hardframedrop).
v                                       Toggle subtitle visibility.
j                                       Cycle through the available subtitles.
y and g                                 Step forward/backward in the subtitle list.
F                                       Toggle displaying forced subtitles .
a                                       Toggle subtitle alignment: top / middle / bottom.
x and z                                 Adjust subtitle delay by +/- 0.1 seconds.
r and t                                 Move subtitles up/down.
i (-edlout mode only)                   Set start or end of an EDL skip and write it out to the given file.
s (-vf screenshot only)                 Take a screenshot.
S (-vf screenshot only)                 Start/stop taking screenshots.
I                                       Show filename on the OSD.
! and @                                 Seek to the beginning of the previous/next chapter.
D (-vo xvmc, -vf yadif, -vf kerndeint only) Activate/deactivate deinterlacer.
 
1 and 2                                 Adjust contrast.
3 and 4                                 Adjust brightness.
5 and 6                                 Adjust hue.
7 and 8                                 Adjust saturation.

Simple pseudo-console interface in python script


#!/usr/bin/env python

# copyright (c) 2010 vprokofyev.blogspot.com <v.prokofyev@gmail.com>

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program (see the file COPYING); if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301 USA.

import sys
import string

class Console:
"""Create psedo-console terminal"""
 def f_prompt(self):
  print "Type 'help' or '?' to list available commands"
  done = False
  while not done:
   self.cmd = raw_input("> ")
   Parser.f_read_prompt()


class Parser:
"""Parse input from user"""
 def f_read_prompt(self):
  command_list = {'h':'help', '?':'?',
      's':'something',
      'q':'quit', 'e':'exit'}
  if Console.cmd in (command_list["h"], command_list["?"]):
   Info.f_usage()

  elif Console.cmd == command_list["s"]:
   CommandOutput.f_somefunction()

  elif Console.cmd in (command_list["q"], command_list["e"]):
   sys.exit()

  elif Console.cmd:
   print "Command not found"

class CommandOutput:
"""Init output"""
 def f_somefunction(self):
  print "Some output"

class Info:
"""Info"""
 def f_usage(self):
  print """
help/?        shows this help
something     print something
quit/exit     close program
"""

Console = Console()
Parser = Parser()
Info = Info()

Console.f_prompt()

git branch

callisto:/srv/sandbox/project$ git init
callisto:/srv/sandbox/project$ git add .
callisto:/srv/sandbox/project$ git commit -m 'Initial commit for master branch'
Created initial commit b2043e5: Initial comment for master branch
1 files changed, 36 insertions(+), 0 deletions(-)
create mode 100755 project.py
callisto:/srv/sandbox/project$ git remote add origin ssh://git.yourdomain.ru/srv/git/project.git
callisto:/srv/sandbox/project$ git push --all origin
Counting objects: 3, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 680 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git://git.yourdomain.ru/srv/git/branch.git
* [new branch] master -> master
callisto:/srv/git/project# git branch -a
* master
origin/master

Switch project to another branch:

callisto:/srv/sandbox/project$ git init
Reinitialized existing Git repository in /srv/sandbox/project/.git/
callisto:/srv/sandbox/project$ git branch -r experimental
callisto:/srv/sandbox/project$ git branch -a
experimental
* master
origin/master
callisto:/srv/sandbox/project$ git checkout experimental
M project.py
Switched to branch "experimental"
callisto:/srv/sandbox/project$ git add .
callisto:/srv/sandbox/project$ git commit -m 'Initial commit for experimental branch'
Created commit 0a0f8cf: Initial commit for experimental branch
1 files changed, 54 insertions(+), 36 deletions(-)
rewrite project.py (98%)
callisto:/srv/sandbox/project$ git push --all origin
Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 1.12 KiB, done.
Total 3 (delta 0), reused 0 (delta 0)
To git://git.yourdomain.ru/srv/git/branch.git
* [new branch] experimental -> experimental
callisto:/srv/sandbox/project$ git branch -a
* experimental
master
origin/experimental
origin/master

syslog-ng config


srv:~# cat /etc/syslog-ng/syslog-ng.conf | grep -v "^#"

options {
chain_hostnames(0);
time_reopen(10);
time_reap(360);
log_fifo_size(2048);
create_dirs(yes);

#owner(root);
group(adm);
perm(0640);

# default owner, group, and permissions for created directories
# (defaults are 0, 0, 0700)
#dir_owner(root);
#dir_group(root);
dir_perm(0755);
use_dns(no);
stats_freq(0);
};


source s_all {
internal();
unix-stream("/dev/log");
file("/proc/kmsg" log_prefix("kernel: "));

# use the following line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
# udp();
};




destination df_auth { file("/var/log/auth.log"); };
destination df_syslog { file("/var/log/syslog"); };
destination df_cron { file("/var/log/cron.log"); };
destination df_daemon { file("/var/log/daemon.log"); };
destination df_kern { file("/var/log/kern.log"); };
destination df_lpr { file("/var/log/lpr.log"); };
destination df_mail { file("/var/log/mail.log"); };
destination df_user { file("/var/log/user.log"); };
destination df_uucp { file("/var/log/uucp.log"); };
destination df_dhcp { file ("/var/log/dhcpd.log"); };
destination df_pppd { file ("/var/log/ppp/pppd.log"); };
destination df_bind { file ("/var/log/bind.log"); };

destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };

destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };

destination df_debug { file("/var/log/debug"); };
destination df_messages { file("/var/log/messages"); };

destination dp_xconsole { pipe("/dev/xconsole"); };

destination du_all { usertty("*"); };




filter f_auth { facility(auth, authpriv); };
filter f_syslog { not facility(auth, authpriv, cron)
and not program ("dhclient")
and not program ("dhcpd")
and not program ("pppd")
and not program ("named"); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_news { facility(news); };
filter f_user { facility(user); };
filter f_uucp { facility(uucp); };
filter f_dhcp { program("dhcpd"); };
filter f_pppd { program("pppd"); };
filter f_bind { program("named"); };

filter f_at_least_info { level(info..emerg); };
filter f_at_least_notice { level(notice..emerg); };
filter f_at_least_warn { level(warn..emerg); };
filter f_at_least_err { level(err..emerg); };
filter f_at_least_crit { level(crit..emerg); };

filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };

filter f_messages { level(info,notice,warn)
and not facility(auth,authpriv,cron,daemon,mail,news)
and not program ("dhclient")
and not program("dhcpd")
and not program ("pppd")
and not program ("named");
};

filter f_emerg { level(emerg); };
filter f_xconsole { facility(daemon,mail)
or level(debug,info,notice,warn)
or (facility(news)
and level(crit,err,notice));
};




log {
source(s_all);
filter(f_auth);
destination(df_auth);
};


log {
source(s_all);
filter(f_syslog);
destination(df_syslog);
};


log {
source(s_all);
filter(f_cron);
destination(df_cron);
};


log {
source(s_all);
filter(f_daemon);
destination(df_daemon);
};


log {
source(s_all);
filter(f_kern);
destination(df_kern);
};


log {
source(s_all);
filter(f_lpr);
destination(df_lpr);
};


log {
source(s_all);
filter(f_mail);
destination(df_mail);
};


log {
source(s_all);
filter(f_user);
destination(df_user);
};


log {
source(s_all);
filter(f_uucp);
destination(df_uucp);
};


log {
source(s_all);
filter(f_mail);
filter(f_at_least_info);
destination(df_facility_dot_info);
};


log {
source(s_all);
filter(f_mail);
filter(f_at_least_warn);
destination(df_facility_dot_warn);
};


log {
source(s_all);
filter(f_mail);
filter(f_at_least_err);
destination(df_facility_dot_err);
};


log {
source(s_all);
filter(f_news);
filter(f_at_least_crit);
destination(df_news_dot_crit);
};


log {
source(s_all);
filter(f_news);
filter(f_at_least_err);
destination(df_news_dot_err);
};


log {
source(s_all);
filter(f_news);
filter(f_at_least_notice);
destination(df_news_dot_notice);
};


log {
source(s_all);
filter(f_debug);
destination(df_debug);
};


log {
source(s_all);
filter(f_messages);
destination(df_messages);
};

log {
source(s_all);
filter(f_emerg);
destination(du_all);
};


log {
source(s_all);
filter(f_xconsole);
destination(dp_xconsole);
};

log {
source(s_all);
filter(f_dhcp);
destination(df_dhcp);
};

log {
source(s_all);
filter(f_pppd);
destination(df_pppd);
};

log {
source(s_all);
filter(f_bind);
destination(df_bind);
};

Check vhosts syntax in apache2

srv:/# cat /etc/apache2/envvars | grep -v -e "^#"

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid
srv:/# apache2 -t -D DUMP_VHOSTS
VirtualHost configuration:
xx.xx.xx.xx:80 is a NameVirtualHost
default server first.yourdomain.ru (/etc/apache2/sites-enabled/first.yourdomain.ru:1)
port 80 namevhost first.yourdomain.ru (/etc/apache2/sites-enabled/first.yourdomain.ru:1)
port 80 namevhost second.yourdomain.ru (/etc/apache2/sites-enabled/second.yourdomain.ru:1)
Syntax OK

git add and remove tags

callisto:/srv/git/project# git log
commit 1f3c033767f90a1df2fef9555c7050531b4fb7e8
Author: user <user@yourdomain.ru>
Date: Sun Apr 4 21:10:30 2010 +0400

Usage subroutine deleted

commit da2f9a391fcb810ac5c23a1e1bac18192ba27ab2
Author: user <user@yourdomain.ru>
Date: Sun Apr 4 21:08:43 2010 +0400

Weak first-bytes validation of ip address replaced to check based on regular expression

callisto:/srv/git/project# git tag 1.0 -a da2f9a391fcb810ac5c23a1e1bac18192ba27ab2 -m 'Release 1.0'
callisto:/srv/git/project# git push --tags
root@git.yourdomain.ru's password:
Counting objects: 1, done.
Writing objects: 100% (1/1), 148 bytes, done.
Total 1 (delta 0), reused 0 (delta 0)
To ssh://git.yourdomain.ru/srv/git/project.git
* [new tag] 1.0 -> 1.0
callisto:/srv/git/project# git tag -d 1.0
Deleted tag '1.0'
callisto:/srv/git/project# git push origin :refs/tags/0.1
root@git.yourdomain.ru's password:
To ssh://git.yourdomain.ru/srv/git/project.git
- [deleted] 1.0
callisto:/srv/git/project#

Configure git-daemon in GNU/Linux Debian

srv:/etc/sv/git-daemon# cat run
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec git-daemon --base-path=/srv/git --export-all --listen=xx.xx.xx.xx --port=9418 --verbose --syslog --enable=receive-pack
srv:/etc/sv/git-daemon# sv force-stop git-daemon
srv:/etc/sv/git-daemon# sv start git-daemon
srv:/etc/sv/git-daemon# ps aux | grep git
root 5565 0.0 0.0 108 28 ? Ss Apr03 0:00 runsv git-daemon
repo 5566 0.0 0.0 128 44 ? S Apr03 0:00 svlogd -tt /var/log/git-daemon
root 9530 0.0 0.1 47516 1416 ? S 22:07 0:00 git-daemon --base-path=/srv/git --export-all --listen=xx.xx.xx.xx --port=9418 --verbose --syslog --enable=receive-pack

callisto:/usr/src# git clone git://git.yourdomain.ru/project.git
Initialized empty Git repository in /usr/src/project/.git/
remote: Counting objects: 17, done.
Receiving objects: 100% (17/17), 9.26 KiB, done.47% (8/17)
Resolving deltas: 100% (3/3), done.(3/3)
remote: Compressing objects: 100% (13/13), done.remote:
remote: Total 17 (delta 3), reused 0 (delta 0)

srv:~# cat /var/log/syslog | grep git
Apr 10 11:58:11 srv git-daemon: [23981] Extended attributes (21 bytes) exist
Apr 10 11:58:11 srv git-daemon: [23981] Request upload-pack for '/project.git'
Apr 10 11:58:12 srv git-daemon: [23981] Disconnected

git delete last commit

callisto:/srv/git/project# git init
callisto:/srv/git/project# git add .
callisto:/srv/git/project# gitt commit -m 'Some bad commit'
callisto:/srv/git/project# git push --all origin
Created commit 3aedac3: ...
1 files changed, 7 insertions(+), 8 deletions(-)
callisto:/srv/git/project#
callisto:/srv/git/project# git reset --hard HEAD~1
HEAD is now at 1920ded Added simple input check that ip-address begins from integer, loops are removed to make script more simple without defining any additional options.
callisto:/srv/git/project# git commit -m 'Some good commit'
callisto:/srv/git/project# git push --all origin
root@git.domain.ru's password:
To ssh://git.domain.ru/srv/git/project.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'ssh://git.domain.ru/srv/git/project.git'
callisto:/srv/git/project# git push origin +master:master
root@git.domain.ru's password:
Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 383 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To ssh://git.domain.ru/srv/git/project.git
+ cb24008...c6c896f master -> master (forced update)

Using screen

user@localhost:~$ screen -S irssi irssi
user@localhost:~$ screen -ls
There are screens on:
4336.irssi (DD.MM.YYYY HH:MM:SS) (Detached)
1 Socket in /var/run/screen/S-root.
user@localhost:~$ screen -r irssi