Skip to content

Instantly share code, notes, and snippets.

/// <summary>константы для месяцев</summary>
/// <remarks>
/// Добавлены исключительно для повышения читаемости кода.
/// В реальном проекте подобные константы должны быть вынесены в отдельный модуль.
/// </remarks>
static class Months {
public const int January = 1,
February = 2,
March = 3,
April = 4,
@iley
iley / extract
Created June 5, 2010 07:00
Script for extracting archives. Detects archive type, creates directories if needed.
#!/usr/bin/perl
# Copyright (c) 2010, Ilya Strukov ([email protected])
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
set1 -> set2
0xFF, 0x76, 0x16, 0x1E, 0x26, 0x25, 0x2E, 0x36, 0x3D, 0x3E, 0x46, 0x45, 0x4E, 0x55, 0x66, 0x0D,
0x15, 0x1D, 0x24, 0x2D, 0x2C, 0x35, 0x3C, 0x43, 0x44, 0x4D, 0x54, 0x5B, 0x5A, 0x14, 0x1C, 0x1B,
0x23, 0x2B, 0x34, 0x33, 0x3B, 0x42, 0x4B, 0x4C, 0x52, 0x0E, 0x12, 0x5D, 0x1A, 0x22, 0x21, 0x2A,
0x32, 0x31, 0x3A, 0x41, 0x49, 0x4A, 0x59, 0x7C, 0x11, 0x29, 0x58, 0x05, 0x06, 0x04, 0x0C, 0x03,
0x0B, 0x02, 0x0A, 0x01, 0x09, 0x77, 0x7E, 0x6C, 0x75, 0x7D, 0x7B, 0x6B, 0x73, 0x74, 0x79, 0x69,
0x72, 0x7A, 0x70, 0x71, 0xFF, 0x5F, 0x61, 0x78, 0x07, 0x51, 0x63, 0x62, 0x64, 0x13, 0x67, 0x27,
0xDA, 0x94, 0xCA, 0xFC, 0x91, 0xFF, 0xEC, 0xF5, 0xFD, 0xEB, 0xF4, 0xE9, 0xF2, 0xFA, 0xF0, 0xF1,
0xF3, 0xA3, 0xA1, 0xB2, 0xB7, 0x0F, 0xF9, 0xFE, 0xFF, 0x6D, 0xFF, 0xFF, 0x6A, 0x9F, 0xA7, 0xAF,
/*
* VictoriaOS: utillity program for floppy images writing
* Copyright Ilya Strukov, 2008
*
* 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.
*/
int main(int argc, const char *argv[])
{
int x;
x = 2 //**/ 2
;
if(x == 1) printf("C89\n");
else {
x = 2 /* &x // */
;
if(x == 2) printf("C++ or C99\n");
@iley
iley / .emacs
Created March 6, 2011 07:53
emacs config
(setq standard-indent 2)
(setq scroll-step 1)
(mouse-wheel-mode t)
; color theme setup
(require 'color-theme)
(color-theme-initialize)
(setq color-theme-is-global t)
(color-theme-dark-laptop)
@iley
iley / post-commit.sh
Created March 24, 2011 10:31
post-commit stats hook
echo === Interpreter stats ===
printf ' %s lines of code\n' `find interpreter -name '*.lisp' -exec cat {} \; | wc -l`
printf ' %s TODOs left\n' `find interpreter -type f -exec grep TODO {} \; | wc -l`
echo =========================
@iley
iley / build.log
Created March 31, 2011 11:02
OpenCV build log
macserver:build_device iley$ SDK_VERSION=4.3 ../opencv_cmake.sh device ../OpenCV-2.1.0
Starting cmake...
Target SDK = iPhoneOS
iOS SDK Version = 4.3
iOS Deployment Target = 3.0
OpenCV Root = ../OpenCV-2.1.0
OpenCV Install Prefix = /Users/iley/Sources/iphone_opencv_test/build_device/../opencv_device
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
@iley
iley / client.ovpn
Created April 10, 2011 06:11
OpenVPN client config (Windows 7)
proto udp
dev tun
remote 10.128.220.101
ifconfig 192.168.3.2 192.168.3.1
secret static.key
route-method exe
route-delay 2
redirect-gateway