Skip to content

Instantly share code, notes, and snippets.

View Gbps's full-sized avatar
🤔
Thinking

Gbps Gbps

🤔
Thinking
View GitHub Profile
@bayleedev
bayleedev / output.txt
Created January 24, 2013 19:43
CURL Options by output number
CURLOPT_AUTOREFERER..............58
CURLOPT_BINARYTRANSFER...........19914
CURLOPT_RETURNTRANSFER...........19913
CURLOPT_COOKIESESSION............96
CURLOPT_CERTINFO.................172
CURLOPT_VERBOSE..................41
CURLOPT_CRLF.....................27
CURLOPT_DNS_USE_GLOBAL_CACHE.....91
CURLOPT_FAILONERROR..............45
@vurdalakov
vurdalakov / strings.h
Created September 30, 2016 02:26
std::string to std::wstring conversion (and vice versa) using Windows API
#pragma once
#include <windows.h>
#include <string>
inline std::wstring multi2wide(const std::string& str, UINT codePage = CP_THREAD_ACP)
{
if (str.empty())
{
return std::wstring();
@menxit
menxit / Docker_UFW_IPTABLES.md
Last active November 2, 2020 08:20
Docker UFW and iptables
  1. Disable iptables
$ sudo vim /etc/docker/daemon.json
{
  "iptables": false
}
//this requires being able to run at kernel mode and assumes you're using MSVC
//this also uses an unnamed structure for cr0_t, which is a nonstandard extension of the C language
//data structure for cr0
typedef union _cr0_t
{
struct
{
uint64_t protection_enable : 1;