This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
setxkbmap -query | grep "\Wtr" 1>/dev/null && setxkbmap us || setxkbmap tr | |
xmodmap /home/nurettin/.Xmodmap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <boost/variant.hpp> | |
typedef boost::variant<std::string, double, int> Data; | |
struct Graph: std::map<Data, Graph> | |
{ | |
Data data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The Pwned Combinator is a patten which gives you the ability to store a common base for templated classes in a container | |
while not losing the ability to access the member variables and functions of the derived instance. | |
In this pattern, the base class uses polymorphism to signal usage which then triggers the callable. | |
*/ | |
struct Base | |
{ | |
virtual void use()= 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <vector> | |
#include <boost/optional.hpp> | |
struct LazyBase | |
{ | |
std::vector<std::reference_wrapper<LazyBase>> dependents; | |
virtual void nullify()= 0; | |
virtual ~LazyBase(){} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the idea is to benchmark and output pretty results | |
#include <iostream> | |
#include <functional> | |
#include <chrono> | |
#include <vector> | |
struct Fun | |
{ | |
std::string name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
struct Times | |
{ | |
unsigned long long t; | |
Times(unsigned long long t) | |
: t(t) | |
{} | |
void operator()(std::function<void(unsigned long long)> block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syn on | |
set ts=2 | |
set sw=2 | |
set et | |
set ai | |
set nocp | |
set bg=dark | |
autocmd FileType make setlocal noet | |
autocmd BufWinLeave *.* mkview | |
autocmd BufWinEnter *.* silent loadview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove Lock = Caps_Lock | |
keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab | |
keycode 23 = Caps_Lock NoSymbol Caps_Lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x= Class.new Object do | |
def inspect | |
"lol!" | |
end | |
end | |
module Lol | |
end | |
Object.const_set("Wtf", x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <map> | |
#include <boost/any.hpp> | |
#include <curl/curl.h> | |
typedef std::map<std::string, boost::any> params_t; | |
void open(params_t params) | |
{ | |
if(boost::any_cast<bool>(params["session"])) |