Skip to content

Instantly share code, notes, and snippets.

View WIttyJudge's full-sized avatar
💣
Keep moving

Ruslan WIttyJudge

💣
Keep moving
View GitHub Profile
@WIttyJudge
WIttyJudge / cleanRAM.sh
Last active August 26, 2020 21:49
The script will clean RAM in linux operation system.
#!/usr/bin/env bash
# Running the script only by root
[ "$EUID" != 0 ] && echo "You have to run this script with superuser" && exit 1
MEMINFO="cat /proc/meminfo"
# # Get memory information
MEM_FREE="$( $MEMINFO | grep MemFree | tr -cd [:digit:] )"
MEM_FREE_MIB="$(expr $MEM_FREE / 1024)"
@WIttyJudge
WIttyJudge / Calculator v2 using class C++.cpp
Last active October 25, 2018 06:06
Feature of this programm: 1) Division by zero isn't possible. 2) You've the opportunity to resume working with calculator.
#include <iostream>
#include <Windows.h>
using namespace std;
class calculator
{
private:
float answer;
public:
@WIttyJudge
WIttyJudge / Calculator.cpp
Created September 30, 2018 18:17
Features of this programm: 1) Division by zero isn't possible.
#include <iostream>
using namespace std;
int main()
{
float fr, sc, result;
char action1;
cout << " Enter the first number: ";
cin >> fr;
@WIttyJudge
WIttyJudge / Calculator v1.cpp
Last active October 1, 2018 12:04
Feature of this programm: 1) Division by zero isn't possible. 2) You have the opportunity to continue working with the calculator.
#include <iostream>
using namespace std;
float firstNum, secondNum;
char action, returnToAction = 'y';
void addition(float firstNum, float secondNum)
{
cout << " Addition: " << firstNum << "+" << secondNum << "=";
cout << firstNum + secondNum;
#include <iostream>
using namespace std;
int main()
{
int rows; char fill; char stroke;
cout << "Select the number of rows: ";
cin >>rows;
cout << "Select the material to fill: ";
cin >>fill;