Skip to content

Instantly share code, notes, and snippets.

View iamcsharper's full-sized avatar
🏠
Working from home

Ilya Yurchenko iamcsharper

🏠
Working from home
  • Greensight
View GitHub Profile
@iamcsharper
iamcsharper / BaseCollection.php
Created December 20, 2015 14:53
This will let you parse all the items from Steam inventory very fast!
<?php
abstract class BaseCollection
{
/**
* rgDescriptions array
* @var array
*/
protected $items = [];
/**
@iamcsharper
iamcsharper / ChemicalReactor.cpp
Created February 19, 2017 14:13
Well, I tried
class ChemicalElement {
private:
float a;
int z;
bool _isMetal;
int period;
int group;
bool main;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
RDP calculator (function evaluator)
typedef struct {
uint16_t step_pin;
uint16_t dir_pin;
uint16_t enable_pin;
bool is_stopped;
} Stepper;
typedef enum {
Forward, Backward
} Direction;
@iamcsharper
iamcsharper / mediawiki.php
Created September 23, 2021 10:46
install mediawiki to current folder
<?php
set_time_limit(0);
// Function to remove folders and files
function rrmdir($dir) {
if (is_dir($dir)) {
$files = scandir($dir);
foreach ($files as $file)
if ($file != "." && $file != "..") rrmdir("$dir/$file");
rmdir($dir);
@iamcsharper
iamcsharper / imitate.js
Created March 31, 2022 19:24
Imitate bad encoding
const dict =
"óåìøóëËÔÒÉÆÉËÁÃÉÑ ÀÖÎÙÈ ÇÕÂÅÒÎÉÊ ÄÁÓÔ ÍÏÝÎÙÊ ÔÏÌÞÏË ÐÏÄߣÍÕ ÓÅÌØÓËÏÇÏ ÈÏÚÑÊÓÔ×Á.";
const text = `Виды выплат компенсационного характера
Выплаты на детей
Компенсации по уходу за нетрудоспособными
Платежи участникам техногенных аварий
Выплаты обучающимся
Компенсации военнослужащим и членам их семей
Платежи переселенным вынужденно
@iamcsharper
iamcsharper / test.js
Created May 14, 2022 17:15
JS Map population performance
const functionOne = () => {
const data = Array.from(Array(2000).keys());
const a = new Map();
data.forEach(e => {
a.set(e, {value: e + 1});
});
return [...a.values()];
};