Skip to content

Instantly share code, notes, and snippets.

View Darker's full-sized avatar

Jakub Mareda Darker

  • Czech Republic
View GitHub Profile
/* License:
* Open source ftw. I doubt anybody would actually like to use this file.
* But if you want, use it, change it or share it under any license you like.
*/
package autoclick;
//Comment this out if you don't have the library
import com.sun.jna.platform.win32.WinDef;
//Used for exporting rect class as normal rectangle
import java.awt.Rectangle;
@Darker
Darker / rapidxml::xml_node_get_children
Created December 8, 2014 22:47
Get rapidxml xml_node children in std::vector
namespace rapidxml {
//I even managed to create it as a template, though I don't understand templates at all
template <class T>
vector<xml_node<T>*> xml_node_get_children(xml_node<T>* node, const char* filter = NULL) {
//This will be returned
vector<xml_node<T>*> children;
for (xml_node<T> *child = node->first_node(); child; child = child->next_sibling())
{
//If filter is ON, only tag name EXACT MATCHES are included
if(filter==NULL || strcmp(filter, child->name())==0)
@Darker
Darker / stripes.cpp
Created November 23, 2014 21:58
Generate a background and set is as Windows wallpaper
// stripes.cpp : Defines the entry point for the console application.
//
//
// Magick++ demo to generate a simple text button
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003
//
#define _CRT_SECURE_NO_WARNINGS
#include <Magick++.h>
#include <string>
@Darker
Darker / gist:0f29836ca7013ee98263
Last active August 29, 2015 14:06
$_SERVER dump
Forgotten what the $_SERVER variable contains? See below:
$_SERVER["COMSPEC"] "C:\windows\system32\cmd.exe"
$_SERVER["CONTENT_LENGTH"] "43"
$_SERVER["CONTENT_TYPE"] "application/x-www-form-urlencoded; charset=UTF-8"
$_SERVER["CONTEXT_DOCUMENT_ROOT"] "C:/xampp/htdocs"
$_SERVER["CONTEXT_PREFIX"]
$_SERVER["DOCUMENT_ROOT"] "C:/xampp/htdocs"
$_SERVER["GATEWAY_INTERFACE"] "CGI/1.1"