Skip to content

Instantly share code, notes, and snippets.

View NuarkNoir's full-sized avatar
👀
hello there

Andrew NuarkNoir

👀
hello there
View GitHub Profile
using System.Diagnostics;
using System.Runtime.InteropServices;
[DllImport("ntdll.dll")]
public static extern int NtSetInformationProcess(IntPtr p, int c, ref int i, int l);
void _BSOD()
{
Process p = Process.GetCurrentProcess();
int g = 1;
@NuarkNoir
NuarkNoir / LibExtractor
Last active October 28, 2017 03:05
Если нет библиотеки, то она достаётся из ресурсов
if (!File.Exists("Newtonsoft.Json.dll"))
{
byte[] resf;
resf = Properties.Resources.Newtonsoft_Json;
File.WriteAllBytes("Newtonsoft.Json.dll", resf);
}
@NuarkNoir
NuarkNoir / prices.py
Created October 28, 2017 03:03
Generating csv file(with name, cost, valute sign, etc.) from regru domains list
from bs4 import BeautifulSoup as bs
import requests
def main():
print("Connecting to regru...")
url = "https://www.reg.ru/company/prices"
doc = bs(requests.get(url).content, "html5lib")
doms = doc.select("div.b-table-tlds__wrapper")
lists = doc.select("li.tooltip")
domensarray = [["Domain", "International", "Discount", "End price", "Valute"]]
@NuarkNoir
NuarkNoir / EquationSolver.java
Last active November 1, 2017 13:52
Класс для решения квадратных уравнений
package xyz.nuark;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author Nuark
* @version 1.0
*
* Класс, который решает квадратные уравнения.
@NuarkNoir
NuarkNoir / palyndrome.py
Created November 29, 2017 05:33
Very shor palyndrome string checker
s=input()
print('YNEOS'[s!=s[::-1]::2])
@NuarkNoir
NuarkNoir / acmp_parser.py
Created November 29, 2017 07:07
ACMP Tasks parser
from bs4 import BeautifulSoup as bs
import requests
import jsonpickle
class ACMP(object):
def __init__(self, task_array):
self.tasks = task_array
class Task(object):
def __init__(self, id, title, topic, solution, difficulty, solvability, accepted):
@NuarkNoir
NuarkNoir / tdmp.py
Last active January 20, 2018 05:50
TrashboxDumperAndDownloader
#coding:utf-8
# python3 tdmp.py
from bs4 import BeautifulSoup as bs
import requests
import jsonpickle
import re
import os
proxyurl = "http://nuark.xyz/proxy.php?h&l="
@NuarkNoir
NuarkNoir / train_1.py
Created January 25, 2018 03:41
Книги Фёдора Меньшикова
"""
Input: start_int end_int
Output: Simple numbers in range from start_int to end_int
"""
k, n = map(int, input().split())
a = list(range(n+1))
a[1] = 0
lst = []
i = 2
@NuarkNoir
NuarkNoir / StrangeStringGenerator.cs
Created April 29, 2018 12:14
Strange String Generator
public string GenerateStrangeString(int ccount = 18)
{
var output = "";
for (var i = 0; i < ccount; i++)
{
output = string.Concat(output, Convert.ToChar(new Random(i).Next(0, 255)));
}
return output;
@NuarkNoir
NuarkNoir / Bezier.cs
Created July 14, 2018 06:38
Draw Bezier curve between two transforms/objects in Unity3D
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bezier : MonoBehaviour {
public Transform firstObject;
public Transform secondObject;
Vector2 P0;