Skip to content

Instantly share code, notes, and snippets.

View warunanc's full-sized avatar

warunanc

View GitHub Profile
@warunanc
warunanc / curl_dump.php
Created March 30, 2018 09:03 — forked from franz-josef-kaiser/curl_dump.php
Debug and dump a WordPress cURL Request and it's response during a WP HTTP API call.
<?php
/**
* Plugin Name: Dump WP HTTP API cURL Request & Response
* Author: Franz Josef Kaiser
*/
add_action( 'plugins_loaded', array( 'WPSE81791_cURL', 'init' ) );
class WPSE81791_cURL
{
protected static $instance;
@warunanc
warunanc / main.cpp
Created November 21, 2017 06:29 — forked from ynonp/main.cpp
QProcess output example
#include <QCoreApplication>
#include <QtCore/QtCore>
#include "monitor.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QProcess p;
p.start("/bin/ls");
@warunanc
warunanc / qchecklist.h
Created November 9, 2017 08:37 — forked from mistic100/qchecklist.h
[Qt/C++] QComboBox with support of checkboxes
#ifndef QCHECKLIST
#define QCHECKLIST
#include <QWidget>
#include <QComboBox>
#include <QStandardItemModel>
#include <QLineEdit>
#include <QEvent>
#include <QStyledItemDelegate>
#include <QListView>
@warunanc
warunanc / app.js
Created September 28, 2017 08:12 — forked from mathisonian/app.js
var svg = d3.select('#example-2')
.append('svg')
.attr('width', '100%')
.attr('viewBox', '0 0 202 202');
var data = d3.range(10).map(function (d, i) {
return i;
});
/* Woocommerce Styles */
.woocommerce-message { display: none; }
.woocommerce-cart.full-width-content .content,
.woocommerce-checkout.full-width-content .content { max-width: 100%; }
.woocommerce-cart .woocommerce table.shop_table td.actions {
border-top: 1px solid #e6e6e6;
background: #f7f7f7;
border-bottom: 0px solid #e6e6e6;
@warunanc
warunanc / rapidxml-example.cpp
Created July 17, 2017 18:19 — forked from t-mat/rapidxml-example.cpp
RapidXML : Simple traverse all nodes/attributes
// RapidXml : http://rapidxml.sourceforge.net/
#include <cstddef>
#include <cassert>
#define RAPIDXML_NO_STDLIB
#define RAPIDXML_NO_EXCEPTIONS
#include "rapidxml-1.13/rapidxml.hpp"
#include <stdio.h>
#include <string>
#include <vector>
@warunanc
warunanc / ClassLoaderLeakExample.java
Created May 7, 2016 17:35 — forked from dpryden/ClassLoaderLeakExample.java
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,