Skip to content

Instantly share code, notes, and snippets.

View ar1a's full-sized avatar

Aria Edmonds ar1a

View GitHub Profile
@ar1a
ar1a / console.lua
Created November 21, 2015 04:32
lua console v1 by aria
--thanks metaman for some stuff
os.execute("cls")
print([[ __ ________ _ _____ ____ __ __ ______ _____ _____
\ \ / / ____| | / ____/ __ \| \/ | ____| /\ | __ \|_ _| /\
\ \ /\ / /| |__ | | | | | | | | \ / | |__ / \ | |__) | | | / \
\ \/ \/ / | __| | | | | | | | | |\/| | __| / /\ \ | _ / | | / /\ \
\ /\ / | |____| |___| |___| |__| | | | | |____ / ____ \| | \ \ _| |_ / ____ \
\/ \/ |______|______\_____\____/|_| |_|______| /_/ \_\_| \_\_____/_/ \_\
]])
@ar1a
ar1a / console.lua
Last active November 22, 2015 09:49
lua console v1.2 by aria
--[[MUST BE RUN ON LUA 5.3 OR DEBUG HOOKS WONT WORK]]
os.execute("cls")
print([[ __ ________ _ _____ ____ __ __ ______ _____ _____
\ \ / / ____| | / ____/ __ \| \/ | ____| /\ | __ \|_ _| /\
\ \ /\ / /| |__ | | | | | | | | \ / | |__ / \ | |__) | | | / \
\ \/ \/ / | __| | | | | | | | | |\/| | __| / /\ \ | _ / | | / /\ \
\ /\ / | |____| |___| |___| |__| | | | | |____ / ____ \| | \ \ _| |_ / ____ \
\/ \/ |______|______\_____\____/|_| |_|______| /_/ \_\_| \_\_____/_/ \_\]])
print([[ _ _____ _ __ ___
function xd(str) local count = 0 for i in string.gmatch(str,"[Dd]") do count = count + 1 end local str = "ecks d" for i = 1, count do str = str .. "EE" end return str end
--converts string to shellcode string
local useconsoleargs = false
local function converttocha(str)
if str == nil then print ("Error - no string passed!") return end
local length = #str + 1
-- will break variable name if special characters in the string (". / * etc")
local retn = "char ch" .. str .. "[" .. length .. "] = {"
@ar1a
ar1a / gist:96b64b1906dcb6ca8ee3
Last active April 10, 2018 17:40
CS:GO server crash
#include <Windows.h>
#include <string>
#include <iomanip>
#include <sstream>
template<typename T> T getvfunc(void *base, unsigned int index)
{
DWORD** tablepointer = (DWORD**)base;
DWORD* tablebase = *tablepointer;
#ifndef SINGLETON_H
#define SINGLETON_H
template<class T>
class singleton
{
public:
static T* instance()
{
return m_instance ? m_instance : (m_instance = new T);
@ar1a
ar1a / output.txt
Last active May 15, 2016 03:47
C++ Trie implementation including ready-to-go autocomplete
word
word2
word3
word4
@ar1a
ar1a / main.cpp
Last active May 1, 2016 08:24
A command line calculator that uses the Shunting-Yard algorithm.
/*
Copyright (c) 2016 Snorflake
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@ar1a
ar1a / Text_file.hpp
Created May 15, 2016 05:57
ifstream wrapper to return an array of strings for each line
#pragma once
#include <vector>
#include <string>
#include <fstream>
class Text_file
{
public:
Text_file() : strings() {}
Text_file(const std::string& file_name) : strings()
@ar1a
ar1a / cbuffer.hpp
Created May 25, 2016 07:40
Templated Circular Buffer in C++
#ifndef __CBUFFER_HPP
#define __CBUFFER_HPP
#include <memory>
#include <stdexcept>
template <typename T>
class Circular_buffer
{
public: