Skip to content

Instantly share code, notes, and snippets.

Apr 21 09:30:38 00[DMN] Starting IKE charon daemon (strongSwan 5.9.6, Linux 5.15.0-69-generic, x86_64)
Apr 21 09:30:38 00[LIB] plugin 'aes': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'kernel-vpp': loaded successfully
Apr 21 09:30:38 01[LIB] created thread 01 [67]
Apr 21 09:30:38 00[LIB] plugin 'des': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'rc2': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'sha2': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'sha1': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'md5': loaded successfully
Apr 21 09:30:38 00[LIB] plugin 'random': loaded successfully
@Bigpet
Bigpet / strip_xcode.py
Created June 10, 2022 14:56 — forked from johnb003/strip_xcode.py
Strip sections from an xcode project that aren't supported by cocoapods.
# Copyright (C) 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@Bigpet
Bigpet / DDR_Fix_reverse_engineer.cpp
Last active April 30, 2024 18:52
Reverse engineered sources to this weird Konami PS3 Dance-Mat Input converter
// DDR_Fix_reverse_engineer.cpp
// Reverse engineered code from the rawinput_ps3_ddr.exe floating around on the net
//
#include <iostream>
#include "Windows.h"
const int ARR_SZ = 16;
DWORD g_PreviousPadState[ARR_SZ];
@Bigpet
Bigpet / reproduction.cpp
Created July 6, 2018 13:05
NtCreateFileRepro
#include <string>
#include <iostream>
#include <Windows.h>
#include <winternl.h>
#include <ntstatus.h>
#pragma comment(lib, "NtDll.lib")
int main(int argc, char *argv[])
@Bigpet
Bigpet / source.cpp
Created February 28, 2018 23:02
sqlite3 win32 crypt example
// sqtest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "sqlite3.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <Wincrypt.h>
@Bigpet
Bigpet / ZCompileOutput
Last active November 20, 2017 16:52
Eigen issue with VS2013
1> ConsoleApplication1.cpp
1>d:\dev\libraries\eigen_3_2_6\eigen\src/Core/CoreEvaluators.h(375): error C2064: term does not evaluate to a function taking 2 arguments
1> class does not define an 'operator()' or a user defined conversion operator to a pointer-to-function or reference-to-function that takes appropriate number of arguments
1> d:\dev\libraries\eigen_3_2_6\eigen\src/Core/CoreEvaluators.h(512) : see reference to function template instantiation 'Scalar Eigen::internal::nullary_wrapper<Scalar,NullaryOp,true,true,true>::operator ()<IndexType>(const NullaryOp &,IndexType,IndexType) const' being compiled
1> with
1> [
1> Scalar=double
1> , NullaryOp=Eigen::internal::scalar_constant_op<double>
1> , IndexType=Eigen::Index
1> ]
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_api_dump.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_core_validation.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_device_limits.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_image.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_object_tracker.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_parameter_validation.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_screenshot.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_swapchain.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file D:\DEV\VulkanSDK\1.0.13.0\Bin\VkLayer_threadin
@Bigpet
Bigpet / gist:7269ebac58b3d34f7b8d
Created December 4, 2015 08:16
VS is trolling me
#include <type_traits>
#include <iostream>
#include <array>
template<typename T>
auto func(const T& t) -> typename std::common_type<float, T>::type
{
return 5.0f + t;
}
@Bigpet
Bigpet / gist:af592d40aadbbac62c43
Created November 30, 2015 09:39
cpp exception question
std::stringstream errorMessage;
errorMessage << "out of range access"
<< "tried to access " << x << ", " << y << ", " << z << ", " << w
<< std::endl << "but image dimensions are: " << width_ << ", " << height_ << ", " << depth_ << ", " << spektrum_
<< std::endl;
throw std::out_of_range(errorMessage.str());
namespace xbrz
{
struct ScalerCfg
{
ScalerCfg() :
luminanceWeight_(1),
equalColorTolerance_(30),
dominantDirectionThreshold(3.6),
steepDirectionThreshold(2.2),
newTestAttribute_(0) {}