This file contains 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
cmake_minimum_required(VERSION 3.3) | |
project(boost_python_example) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
set(SOURCE_FILES main.cpp) | |
find_package(Boost COMPONENTS python REQUIRED) | |
include_directories(${Boost_INCLUDE_DIRS}) |
This file contains 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
<?php | |
#index.php | |
// Assuming the Following directory structures | |
// | |
// |-- index.php | |
// `-- library | |
// `-- Zend | |
// |-- Db | |
// |-- Db.php |
This file contains 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
--TEST-- | |
Example test emulating a file upload | |
--SKIPIF-- | |
<?php if (php_sapi_name()=='cli') die('skip'); ?> | |
--POST_RAW-- | |
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryfywL8UCjFtqUBTQn | |
------WebKitFormBoundaryfywL8UCjFtqUBTQn | |
Content-Disposition: form-data; name="file"; filename="example.txt" | |
Content-Type: text/plain |
This file contains 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
nslookup mine.moneropool.com | |
Server: 127.0.1.1 | |
Address: 127.0.1.1#53 | |
Non-authoritative answer: | |
Name: mine.moneropool.com | |
Address: 54.75.230.12 | |
Name: mine.moneropool.com | |
Address: 54.75.230.15 | |
Name: mine.moneropool.com |
This file contains 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/python3 | |
# | |
# add this, for example, /home/marcin/bin/startgimp.py | |
# to IfranViews Miscellaneus Properties/Settings | |
# | |
import os | |
import sys | |
gimp_cmd = '/usr/bin/gimp-2.8 ' |
This file contains 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/python3 | |
# | |
# Put the file, for example in: /home/marcin/bin/startirfan.py | |
# and mark it as executable: chmod +x /home/marcin/bin/startirfan.py | |
# | |
# Make IrfanViewMine.desktop in /home/marcin/.local/share/applications that contains: | |
# | |
# [Desktop Entry] | |
# Encoding=UTF-8 | |
# Name=MineIrfanView348 |
This file contains 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
/** | |
* Example of returning a value from threads | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <mutex> | |
#include <thread> | |
using namespace std; |
This file contains 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
/** | |
* Code taken from http://stackoverflow.com/a/11408470/248823 | |
*/ | |
#include <vector> | |
#include <string> | |
#include <sstream> | |
#include <iterator> | |
#include <iostream> | |
#include <stdexcept> |
This file contains 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
/* How to use enum class and to obtain its value as integer and string | |
* without too much of code repition. | |
* | |
* Based on http://stackoverflow.com/a/238157/248823 | |
*/ | |
#include <iostream> | |
using namespace std; |
This file contains 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 <errno.h> | |
#include <dirent.h> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int dir_scan(const string & in_path, vector<string> & found_paths) |