Skip to content

Instantly share code, notes, and snippets.

@DRITE
DRITE / config.yml
Created May 22, 2026 11:46
Lazygit config
os:
edit: 'helix {{filename}}'
editInTerminal: true
editAtLine: "hx {{filename}}:{{line}}"
git:
# statusPanelView: allBranchesLog
log:
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
# 'topo-order' makes it easier to read the git log graph, but commits may not
@DRITE
DRITE / .bashrc
Created May 21, 2026 19:51
Linux configs
############################### set git branch name to prompt ##############################################################
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
@DRITE
DRITE / config.toml
Last active May 21, 2026 07:49
Helix Editor. Configs.
theme = 'darcula-solid'
[editor]
auto-format = true
[editor.auto-save]
focus-lost = true
after-delay.enable = true
after-delay.timeout = 500
@DRITE
DRITE / ReportGenerator.java
Last active June 27, 2016 00:54
Тестовое задание для Texuna
package texuna.test;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@DRITE
DRITE / gist:4074590
Created November 14, 2012 20:33
задача 4.11 переписанная с указателями
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <malloc.h>
void vvod(int *p, int *n);
void vivod(int *p, int n);
void sr_ar(int *p, int n, float sr);
void proiz(int *p, int n, float pr);
@DRITE
DRITE / gist:4074575
Created November 14, 2012 20:30
Поиск корня уравнения tan(x/2)-x=0
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <math.h>
float pol_del(float a, float b, float eps, int *fl, float (*f)(float x));
float horda(float a, float b, float eps, int *fl, float (*f)(float x),float (*fp)(float x));
float f(float x);
float fp(float x);
int _tmain(int argc, _TCHAR* argv[])
{
@DRITE
DRITE / gist:4012774
Created November 4, 2012 17:54
Вычисление интегралов
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <math.h>
float ylychpr(float a,float b,int n,float(*f)(float x));
float trapec(float a,float b,int n,float(*f)(float x));
float tochnoe(float a,float b,float(*ff)(float x));
float zadpog(float a,float b,float *eps, float(*f)(float x));
float f1(float x);
float f2(float x);
@DRITE
DRITE / gist:3948920
Created October 24, 2012 21:12
Вариант 7 и 8
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <math.h>
void vivod(float a, float b, int n,float (*f)(float x),float (*ff)(float x));
float ylychpryam(float a, float b, int n,float (*f)(float x));
float trapecii(float a, float b, int n,float (*f)(float x));
float tochnbli(float a, float b,float (*ff)(float x));
float f1(float x);
float f2(float x);
@DRITE
DRITE / gist:3907581
Created October 17, 2012 19:28
Насте
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
const int n=25;
void vvod(int a[], int *k);
void vivod(int a[], int k);
int fib(int a[],/*int sr[], int k,*/ int nom);
void sort(int p[], int k);
int _tmain(int argc, _TCHAR* argv[])
@DRITE
DRITE / gist:3901913
Created October 16, 2012 20:50
Составить функцию, которая в одномерном массиве d определяет первый от конца отрицательный элемент. В случае нахождения отрицательного числа, функция возвращает это число, в противном случае возвращает единицу. С помощью функции определить в каждой строке
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
const int l=12;
const int m=14;
const int n=25;
int per_otr(int d[],int *kstr);
void sort(int p[], int k);
void vivod(int a[], int kstr);