Skip to content

Instantly share code, notes, and snippets.

View alesya-h's full-sized avatar

Alesya Huzik alesya-h

View GitHub Profile
@alesya-h
alesya-h / func.c
Created December 21, 2010 23:23
решение твоей задачи
#include <stdio.h>
#include <stdlib.h>
#define MAXN 3
#define MAXM 10
int A(int n, int m) // собственно наша функция. сразу замечу что смысла в ней
{ // я не нашел, она просто делает то что сказано в условии.
if(n==0) { // первая строчка условия. если n=0
return m + 1; // то значение функции это m+1
@alesya-h
alesya-h / max.c
Created December 26, 2010 17:54
Лаба по Операционным сетям. Извини что с такой задержкой.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <unistd.h>
sem_t * out_sem;
@alesya-h
alesya-h / exe.c
Created January 2, 2011 23:37
Это решение твоего шестого варианта. Предыдущий файл был для пятого.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <unistd.h>
sem_t * out_sem;
@alesya-h
alesya-h / gist:783540
Created January 17, 2011 21:45
кусок .bashrc
NONE="\033[0m" # unsets color to term's fg color
# regular colors
K="\033[0;30m" # black
R="\033[0;31m" # red
G="\033[0;32m" # green
Y="\033[0;33m" # yellow
B="\033[0;34m" # blue
M="\033[0;35m" # magenta
C="\033[0;36m" # cyan
@alesya-h
alesya-h / 1.lisp
Created September 14, 2011 15:40
MG lab1
(ql:quickload "clx")
(defpackage #:lab-1
(:use :cl :asdf))
(in-package :lab-1)
(defun graphic-x (width height &optional (dots '((1 2) (2 3) (3 4) (4 5)))(host ""))
(let* ((display (xlib:open-display host))
(screen (first (xlib:display-roots display)))
(black (xlib:screen-black-pixel screen))
@alesya-h
alesya-h / evil-insert-jk-for-normal-mode.el
Created January 3, 2012 11:46
type jk in insert mode to switch to normal mode (for emacs-evil)
(defun evil-insert-jk-for-normal-mode ()
(interactive)
(insert "j")
(let ((event (read-event nil)))
(if (= event ?k)
(progn
(backward-delete-char 1)
(evil-normal-state))
(push event unread-command-events))))
(define-key evil-insert-state-map "j" 'evil-insert-jk-for-normal-mode)
@alesya-h
alesya-h / resume.org
Created March 26, 2012 10:31
Some kind of resume

Education

Name of Institution:Belarusian State University of Informatics and Radioelectronics
Faculty:Computer Systems and Networks
Specialization:Computers, Systems and Networks
Diploma professionsystems engineer
Education Formday’s
Education LevelHigher education
Academic degreeDiploma in Software Engineering
Year of graduation2012
@alesya-h
alesya-h / vkpd.lisp
Created August 26, 2012 11:55
vkpd.rb read as lisp
(PROGRAM
((COMMAND (@IDENT "require" (2 0))
(ARGS_ADD_BLOCK
((STRING_LITERAL (STRING_CONTENT (@TSTRING_CONTENT "net/http" (2 9)))))
FALSE))
(COMMAND (@IDENT "require" (3 0))
(ARGS_ADD_BLOCK
((STRING_LITERAL (STRING_CONTENT (@TSTRING_CONTENT "net/https" (3 9)))))
FALSE))
(COMMAND (@IDENT "require" (4 0))
@alesya-h
alesya-h / zi.lisp
Created September 19, 2012 17:36
Лаба по защите информации
(ql:quickload "bordeaux-threads")
(defmacro logging (message &rest body)
`(progn
(format t ,message)
,@body
(format t " done.~%")))
(defun current-thread-name ()
(bordeaux-threads:thread-name
@alesya-h
alesya-h / mg1.lisp
Created September 19, 2012 17:37
Лаба 1 по машинной графике
(ql:quickload "clx")
(defpackage #:lab-1
(:use :cl :asdf))
(in-package :lab-1)
(defmacro add-to-list (list new-head)
`(setq ,list (cons ,new-head ,list)))