Skip to content

Instantly share code, notes, and snippets.

View savolla's full-sized avatar

Oleksiy Nehlyadyuk savolla

View GitHub Profile
@savolla
savolla / example.cpp
Created May 1, 2019 13:25
getting error when compiling the code below
// my compilation command: g++ -o burrito main.cpp
// ERROR:
// /usr/bin/ld: /tmp/ccruqflI.o:A in function `main':
// main.cpp:(.text+0x1f): undefined reference to `Burrito::Burrito()'
// collect2: error: ld returned 1 exit status
// Burrito.h
#ifndef BURRITO_H
#define BURRITO_H
int listOfAngles[] = {30, 45, 60, 90, 180, 360};
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}
void rotateStepperMotor(bool rotationDirection, float rotationSpeed, int angle)
#!/bin/bash
# this is for setting up my own setup on a new machine
# IRC
cp -r IRC/.weechat/ ~/
# NeoVIM
mkdir -p ~/.local/share/ && cp -r NeoVIM/nvimlocal/nvim ~/.local/share/
mkdir -p ~/.config/ && cp -r NeoVIM/nvimconfig/nvim ~/.config/
@savolla
savolla / $2 >> installed-programs is not working
Created January 14, 2019 23:59
installed programs tracker
#!/bin/bash
# pacman -S program --> this is gonna push 'program' into installed-programs.txt
if [ $1=="-S" ]; then
echo $2 >> installed-programs.txt
fi
# pacman -R program --> this is gonna remove the 'program' from installed-programs.txt
if [ $1=="-R" ]; then
echo $(cat installed-programs.txt | grep -v "^$2$") > installed-programs.txt
@savolla
savolla / final1.cpp
Created January 6, 2019 20:23
final 1. soru c++ kodu
#include <iostream>
#include <cmath>
using namespace std;
double karekok(unsigned int x)
{
return sqrt(x);
}
double quadkok(unsigned int x)
@savolla
savolla / final4.cpp
Created January 6, 2019 20:17
final 4. soru
#include <iostream>
using namespace std;
int main(void)
{
int enBuyuk = 0; // 0 verdik çünkü 9 her zaman büyük olacak. referans olarak 0 verdik
int enKucuk = 9; // enBuyuk için yapılan şeyin aynısı
int islenecekSayi; // kullancıdan alınacak sayıyı tanımladık
short basamak;
@savolla
savolla / f4d1m3.cpp
Created January 6, 2019 19:31
algoritma final sınavı 3. soru :P
#include <iostream>
#include <cmath>
using namespace std;
int main(void)
{
int sayi = 6;
int limit = 9999;
int toplam = 0;
@savolla
savolla / error
Created November 19, 2018 20:37
getting this while installing radare2-cutter package from pacman
resolving dependencies...
looking for conflicting packages...
Packages (3) capstone-3.0.5-1 radare2-3.0.1-1 radare2-cutter-1.7.2.r20.g705735c-2
Total Installed Size: 30,41 MiB
checking keyring...
checking package integrity...
loading package files...
linux414-rt-virtualbox-guest-modules.conf
linux414-rt-virtualbox-host-modules.conf
linux416-rt-virtualbox-host-modules.conf
linux418-rt-virtualbox-host-modules.conf
modules.conf
@savolla
savolla / odev1.cpp
Created October 24, 2018 20:09
10'dan 100'e kadar içinde sadece tek rakamların olduğu asal sayıları bastıran program
#include <iostream>
using namespace std;
int asal = 0;
int main(void)
{
for(int a =10; a<=100; a++)
loop_1:
{