steinkrauz - March 6th, 2013

> Recent Entries
> Archive
> Friends
> User Info

March 6th, 2013


12:00 pm - copy con in Power Shell
If you want to use good old 'copy con' in a PowerShell command prompt, you are to use a here-string:
PS C:\Users\Pit> @"
>> Hello, world!
>> Bye-bye...
>> "@ > .\test.txt
>>
PS C:\Users\Pit> cat .\test.txt
Hello, world!
Bye-bye...
PS C:\Users\Pit>


Beware! The resulting file will be in Unicode, not in ASCII, so some old command-line tools may not like this kind of input.
Tags:

(Leave a comment)

02:45 pm - mod_access_filter
Накорябал по случаю фильтр для апача. Девелоперская документация к нему, кстати, говно полное.

http://bitbucket.org/steinkrauz/mod_access_filter

Simple Apache access filter based on IP/login pairs for HTTP-based applications without such a future.

# Enabling
Add following directives to httpd.conf:

`LoadModule access_filter_module modules/mod_access_filter.so`

`UseAccessFilter On`

# Configuring
Main module config is expected in `conf/access_filter.txt`. Each line in the file should be in the following form:
``

* Network address is the literal part of an allowed IP address. I.e. 10.1.1 will match both 10.1.1.10 and 10.1.100.10
* Tab is one tabulation character. No spaces allowed.
* File name is a path to a file with a list of logins allowed in the given network. One login per line, no extra characters.

# Logging
The module will log _allowed_ and _denied_ events in the error log. The messages are logged at the 'error' level. The messages' format is following: `User <login> from <remote IP> blocked|allowed`.

(Leave a comment)

09:06 pm - Пока заваривается чай
Как-то посетила Углич
Киноактриса Таня Друбич
В обед десятками блины ела
А на сцену поднялась, да тут же набздела

Мушкетёры кинули клич:
Вместе, да махнём в Углич
Не было, к счастью, среди них Димы:
А то напились и зарезали б, образины.

Хотел побывать и Надсон,
Но приснился ему сон:
Вроде как приехал в Углич,
И тут же его разбил паралич.

Не видели жители Углича
И железного наркома Кагановича
Хотел там заняться железной дорогой,
Да отравился несвежей миногой.

В день парада планет
В Углич провели Интернет:
Парни вдруг прекратили бухать
Стали тут же порнуху качать.

Шёл по реке теплоход,
На нём водили хоровод.
Угличанам этот вид не в новинку,
В ответ покажут расстёгнутую ширинку.

(2 comments | Leave a comment)


Previous Day [Archive] Next Day

> Go to Top
LJ.Rossia.org