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
/** | |
* Split container into chunks of an equal size | |
* | |
* An example C++11 function called chunker that takes | |
* a container (vector, list, deque), divides it | |
* into equal chunks of a given size, and returns | |
* container of chunks. | |
* | |
* | |
* The example code is based on the two following posts: |
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
#!/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
#!/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
# get git to install it | |
sudo apt-get install git | |
# dependencies | |
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev | |
# download latest version | |
git clone https://github.com/wolf9466/cpuminer-multi | |
cd cpuminer-multi/ |
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
# if you havent done it yet, please download the tor-browser and start it | |
# https://www.torproject.org/download/download-easy.html.en | |
wget https://www.torproject.org/dist/torbrowser/5.0/tor-browser-linux64-5.0_en-US.tar.xz | |
tar xf tor-browser-linux64-5.0_en-US.tar.xz | |
# download the source of proxychains-ng | |
git clone https://github.com/rofl0r/proxychains-ng.git | |
cd proxychains-ng |
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
# The gist shows how to compile latest monero source code on | |
# Ubuntu 14.04 | |
# install git | |
sudo apt-get install git | |
# install dependencies | |
sudo apt-get install build-essential cmake libboost1.55-all-dev libssl-dev libgtextutils-dev pkg-config libunbound-dev libevent-dev libgtest-dev graphviz doxygen libdb5.3++-dev |
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 <iostream> | |
#include <vector> | |
#include <memory> | |
#include "boost/shared_ptr.hpp" | |
#include "boost/python.hpp" | |
#include "boost/python/stl_iterator.hpp" | |
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
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}) |