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
/** | |
* @file Timer.cpp | |
* | |
* A simple timer wrapper implementation for Linux (can be adjusted for other OSs easily). | |
* | |
* @author Isaac Garzon | |
* @since 05/04/2015 | |
*/ | |
#if !defined(__linux__) |
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
/** | |
* @file AbsoluteTimer.cpp | |
* | |
* A simple absolute timer wrapper implementation for Linux (can be adjusted for other OSs easily). | |
* | |
* @author Isaac Garzon | |
* @since 11/04/2015 | |
*/ | |
#if !defined(__linux__) |
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> | |
struct BaseEnum | |
{ | |
public: | |
operator int() const { return this->type_; } | |
protected: | |
inline BaseEnum(int type) : type_(type) {} |
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 <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
namespace detail | |
{ | |
template<typename T> | |
bool detail_echo(const T *obj, const char *arg) | |
{ | |
if (!obj) |
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
@echo off | |
if "%1" == "" (set "BCDREC={current}") else (set "BCDREC=%1") | |
echo Setting Hyper-V off for %BCDREC%... | |
bcdedit /set %BCDREC% hypervisorlaunchtype off | |
if errorlevel 1 (goto fail) | |
echo. | |
echo Rebooting into No Hyper-V Mode | |
echo ============================== | |
echo Press any key to restart or CTRL-C to restart manually | |
pause |
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
#!/usr/bin/sudo ruby | |
# | |
# revealer.rb -- Deobfuscate GHE .rb files. | |
# | |
# This is simple: | |
# Every obfuscated file in the GHE VM contains the following code: | |
# | |
# > require "ruby_concealer.so" | |
# > __ruby_concealer__ "..." |
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
pub use std::mem | |
#[macro_export] | |
macro_rules! offset_of { | |
($sty:ty, $($field:tt)+) => ({ | |
unsafe { | |
let root: $sty = $crate::mem::uninitialized(); | |
let base = &root as *const _ as usize; | |
let end = &root.$($field)* as *const _ as usize; | |
end - base |
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 <stddef.h> | |
namespace detail | |
{ | |
template<class, class> struct is_compatible { enum { value = 0 }; }; | |
template<class T> struct is_compatible<T, T> { enum { value = 1 }; }; | |
template<class T, size_t N> struct is_compatible<T[], T[N]> { enum { value = 1 }; }; | |
template<class T, size_t N> struct is_compatible<T[N], T[]> { enum { value = 1 }; }; |
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
from __future__ import print_function | |
import os | |
import sys | |
import re | |
from datetime import datetime, timedelta | |
import pickle | |
from multiprocessing import cpu_count | |
from multiprocessing.dummy import Pool as ThreadPool | |
import toml | |
import requests |
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 <stddef.h> | |
#include <stdint.h> | |
#include <limits> | |
#include <type_traits> | |
namespace detail | |
{ | |
template<size_t R, class T> | |
static inline constexpr T rotl(const T v) | |
{ |
OlderNewer