Skip to content

Instantly share code, notes, and snippets.

View desulaid's full-sized avatar
:octocat:
<_<

Anton Styazhkin desulaid

:octocat:
<_<
View GitHub Profile
@desulaid
desulaid / tasks.json
Last active September 30, 2019 11:14
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Python File",
"type": "shell",
"command": "python -B ./${relativeFile}",
"group": {
"kind": "build",
"isDefault": true
@desulaid
desulaid / *.py
Created October 5, 2018 21:14
Получение даты ВСЕХ пользователей ВК
import requests
import re
import time
import os
def get_date_foaf(id):
"""
Функция get_date_foaf возвращает True, если пользователь существует, а иначе - False.
При вызове она создает в папке vk файл с id пользователя.
В файле есть дата и время регистрации в вк.

Keybase proof

I hereby claim:

  • I am desulaid on github.
  • I am desulaid (https://keybase.io/desulaid) on keybase.
  • I have a public key ASAJ5eZ7dqc0ysHKwb7K5V9VwznnHF_qXcU6Wv4V4FOJfAo

To claim this, I am signing this object:

@desulaid
desulaid / *.pwn
Created September 28, 2018 13:18
#define dialog%0\32;%1(%2) \
public dlg_%1(%2); \
public dlg_%1(%2)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
new
func[32] = "dlg_",
dlgid[6];
valstr(dlgid, dialogid);
@desulaid
desulaid / *.c
Last active September 5, 2018 18:11
Типа вызвал функцию по адресу
#include <stdio.h>
void test(int (*heh)(const char *str, ...));
int main() {
int (*addr)(const char *str, ...) = &printf;
test(addr);
}
void test(int (*heh)(const char *str, ...)) {
@desulaid
desulaid / vk.py
Last active August 30, 2018 06:41
Время в статусе в ВК
#!/usr/bin/env python3
from time import sleep
from requests import post
from time import localtime
from time import strftime
from re import findall
class Vk:
def __init__(self, access_token):
@desulaid
desulaid / hello.pas
Created July 15, 2018 18:34
free pascal regex
program regex;
uses
RegExpr;
var
re:TRegExpr;
count:Integer;
text:String;
@desulaid
desulaid / hello.py
Created July 15, 2018 18:11
python3 regex
import re
text = input('Введите строку: ')
count = len(re.findall(r"\w+", text))
print(f'Количество слов: {count}')
@desulaid
desulaid / hello.cpp
Created July 15, 2018 18:10
c++11 regex
#include <iostream>
#include <regex>
#include <string>
int main()
{
std::string text;
std::regex exp("\\w+");
std::smatch match;
@desulaid
desulaid / NoVKAPI.rb
Last active June 23, 2018 10:54
Чем богат vk foaf
require 'net/http'
require 'date'
class NoVKAPI
attr_accessor :file
# Инициализация нового пользователя
def initialize(id)
uri = URI("https://vk.com/foaf.php?id=#{id}")
@file = Net::HTTP.get(uri)