Skip to content

Instantly share code, notes, and snippets.

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

Vitaliy Vorobets imring

🏠
Working from home
View GitHub Profile
script_name 'compile_lua'
script_author'imring'
imgui = require 'imgui'
encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
compiler_lua = imgui.ImBool(false)
code_buffer = imgui.ImBuffer('print("Hello world!")', 0xFFFFFF)
-- Decompiled by imring
script_name("COP")
script_description("/cop - Основная команда.")
script_version("V1.0")
script_author("Liechtenstein")
script_dependencies("SAMPFUNCS, SAMP")
require("lib.moonloader")
local sampev = require("lib.samp.events")
script_name('ScreenManager')
script_author('imring')
local imgui = require 'imgui'
local encoding = require 'encoding'
local requests = require 'requests'
local folder = require 'folder'
local memory = require 'memory'
local imagesize = require 'imagesize'
@imring
imring / sacc.c
Last active December 1, 2020 14:53
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
unsigned long keyTable[] = {
0x0, 77073096, 0x0EE0E612C, 0x990951BA, 0x76DC419, 0x706AF48F,
0x0E963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0x0E0D5E91E,
0x97D2D988, 0x9B64C2B, 0x7EB17CBD, 0x0E7B82D07, 0x90BF1D91,
0x1DB71064, 0x6AB020F2, 0x0F3B97148, 0x84BE41DE, 0x1ADAD47D,
local function script_path() -- https://stackoverflow.com/a/39637679
local str = debug.getinfo(2, 'S').source:sub(2)
return str:match('(.*/)')
end
local function char_to_hex(str)
return string.format("%%%02X", string.byte(str))
end
local function url_encode(str)
@imring
imring / vkapi.lua
Last active January 26, 2021 17:39
local requests = require 'requests'
local json = require 'cjson'
local url = 'https://api.vk.com/method/%s'
local mt = {}
-- http://lua-users.org/wiki/CopyTable
local function shallowcopy(orig)
local orig_type = type(orig)
local copy
#include <filesystem>
#include <fstream>
#include <iostream>
#include <fmt/core.h>
#include <fmt/os.h>
#include "bclist.hpp"
namespace fs = std::filesystem;
local requests = require 'requests'
local url = 'https://api.telegram.org/bot%s/%s'
local mt = {}
-- http://lua-users.org/wiki/CopyTable
local function shallowcopy(orig)
local orig_type = type(orig)
local copy
// ==UserScript==
// @name bh + highlight.js
// @namespace https://www.blast.hk/
// @author imring
// @match https://www.blast.hk/attachments/*/plain
// @icon https://www.google.com/s2/favicons?domain=blast.hk
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/languages/go.min.js
BasedOnStyle: LLVM
AlignEscapedNewlines: Left
AlwaysBreakTemplateDeclarations: Yes
SpaceBeforeRangeBasedForLoopColon: false
UseTab: Never
SortIncludes: Never
AllowShortFunctionsOnASingleLine: Empty
IndentWrappedFunctionNames: false
AlwaysBreakAfterDefinitionReturnType: None
ColumnLimit: 120