Skip to content

Instantly share code, notes, and snippets.

/* p1, p2, p3 defined as pointers to int, while i1, i2 and i3 as just int variables */
int *p1, i1;
int* p2, i2;
int * p3, i3;
/* constant pointer to int */
int *const p;
/* pointer to constant int */
int const *p;
data:image/png;base64,iVBORw0KGgoAA...
Перкодировка большого числа файлов из cp1251 в UTF-8
====================================================
Полное условие задачи:
* Смена кодировки текстового файла с cp1251 на UTF-8
* Последняя строка обязательно должна завершаться символом конца строки
* В качестве символа конца строки должны выступать CR + LF, как в DOS
Решение с помощью редактора Vim:
@while0pass
while0pass / _README
Created May 21, 2010 15:07
Добавление PPA для cherokee, nginx, git и postgresql
Добавление частных репозиториев в Ubuntu для веб-серверов nginx, cherokee,
системы контроля версий git и СУБД postgresql-9.1
To start installing and using software from a Personal Package Archive, you
first need to tell Ubuntu where to find the PPA.
Important: The contents of Personal Package Archives are not checked or
monitored. You install software from them at your own risk.
== Adding the PPA to Ubuntu 9.10 (Karmic) and later ==
Скрипт, который просматривает все подпапки текущей папки
и объединяет для каждой папки имеющиеся в ней mp3-файлы
в один mp3 c именем самой папки, где они находились.
@while0pass
while0pass / listchars.vim
Last active April 22, 2024 05:59
show/hide hidden characters in Vim
" hide hidden chars
:set nolist
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓,nbsp:░
" or
@while0pass
while0pass / .bashrc
Created August 6, 2010 21:29
my customized settings for vim and bash
# For Windows:
#alias vi="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe"
#alias vim="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe"
#alias gvim="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe"
# For Linux:
#alias vi="/usr/bin/gvim"
#alias vim="/usr/bin/gvim"
#export PYTHONPATH="/home/andrei/repogitories/"
@while0pass
while0pass / button.css
Created August 25, 2010 20:57
Красивая кнопочка формы, одинаковая во всех браузерах.
/* from http://www.appcelerator.com/ */
.cform input.sendbutton {
width: 100px;
padding: 2px;
margin: 10px 3px 0;
font-size: 0.8em;
background: url(http://www.appcelerator.com/wp-content/plugins/cforms/images/button-bg.gif) repeat-x;
border: 1px solid #adadad!important;
border-left-color: #ececec!important;
@while0pass
while0pass / if.asp
Created September 7, 2010 13:17
Условная конструкция для отображения до определенного срока в ASP (VBScript).
<% if Now() < cdate("20/09/2010 14:53:00") then
'ДД/ММ/ГГГГ ЧЧ:ММ:СС' %>
<!--
Разметка внутри этой инструкции if
будет появляться только до 20.09.2010
до 14:53:00.
-->
<% end if %>
@while0pass
while0pass / MetaWebPro.css
Created September 8, 2010 08:59
CSS for MetaWebPro Typeface from Mozilla.org
<style type="text/css">
/* MetaWebPro font family licensed from fontshop.com. WOFF-FTW! */
@font-face {
font-family: 'MetaWebPro-Book';
src: url('http://www.mozilla.com/img/fonts/MetaWebPro-Book.woff') format('woff');
}
@font-face {