Skip to content

Instantly share code, notes, and snippets.

View KrzaQ's full-sized avatar

Paweł Zakrzewski KrzaQ

View GitHub Profile
@KrzaQ
KrzaQ / DLL
Created April 17, 2012 23:30 — forked from anonymous/DLL
DLL
// dllmain.cpp : Defines the entry point for the DLL application.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
HINSTANCE g_hInstance = NULL;
//Game.exe+113F0 - 55 - push ebp
// int __cdecl sub_4113F0(LPCSTR lpText)
#include <iostream>
#include <iomanip>
#include <type_traits>
#include <sstream>
#include <boost/tti/has_member_function.hpp>
struct int_size{
int size() const { return 42; };
};
@KrzaQ
KrzaQ / example.cpp
Created October 13, 2014 09:27
Default example cpp by kq
#include <cstdlib>
#include <cstdint>
#include <ctime>
#include <algorithm>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
@KrzaQ
KrzaQ / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
if __FILE__ == $0
ip = ARGV[0]
if not ip =~ /^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$/
$stderr.puts "'#{ip}' is not a valid IP"
exit
end
`/etc/init.d/denyhosts stop`
@KrzaQ
KrzaQ / kq.opml.xml
Last active October 28, 2015 14:16
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>KrzaQ subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="all" title="all">
<outline type="rss" text="Growing up" title="Growing up" xmlUrl="http://marcoarena.wordpress.com/feed/" htmlUrl="https://marcoarena.wordpress.com"/>
<outline type="rss" text="xorl %eax, %eax" title="xorl %eax, %eax" xmlUrl="https://xorl.wordpress.com/feed/" htmlUrl="https://xorl.wordpress.com"/>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <algorithm>
#include <array>
#include <atomic>
#include <chrono>
#include <cassert>
#include <climits>
#include <csetjmp>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <algorithm>
#include <array>
#include <atomic>
<h1 id="test"> test</h1>
<h2 id="bleh"> bleh</h2>
<pre class="prettyprint"><code>foo
foo bar baz
class huj {};
</code></pre>
<p>inline code: <code class="prettyprint">inline code</code>
</p>
[Finished in 0.3s]
@KrzaQ
KrzaQ / core.d
Created February 20, 2017 14:21
import std.datetime;
import std.string;
class Author
{
string name;
string email;
string hashedPassword;
}