Skip to content

Instantly share code, notes, and snippets.

@marcinwol
marcinwol / imagemagick7.sh
Created Nov 5, 2016
Compile ImageMagick 7 on Ubuntu 16.04
View imagemagick7.sh
sudo apt install build-essential autoconf automake autopoint chrpath cm-super-minimal debhelper dh-autoreconf dh-strip-nondeterminism doxygen doxygen-latex gir1.2-rsvg-2.0 graphviz libbz2-dev libcairo-script-interpreter2 libcairo2-dev libcdt5 libcgraph6 libclang1-3.6 libdjvulibre-dev libexif-dev libfftw3-bin libfftw3-dev libfftw3-long3 libfftw3-quad3 libfile-stripnondeterminism-perl libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev libglib2.0-dev libgvc6 libgvpr2 libharfbuzz-dev libharfbuzz-gobject0 libice-dev libilmbase-dev libjasper-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjs-jquery liblcms2-dev libllvm3.6v5 liblqr-1-0-dev liblzma-dev libobjc-5-dev libobjc4 libopenexr-dev libpango1.0-dev libpathplan4 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl-dev libpixman-1-dev libpng12-dev libpotrace0 libptexenc1 libpthread-stubs0-dev librsvg2-bin librsvg2-dev libsigsegv2 libsm-dev libsynctex1 libtexlua52 libtexluajit2 libtiff5-dev libtiffxx5 libwmf-dev libx11-dev li
@marcinwol
marcinwol / CMakeList.txt
Created Nov 5, 2015
CMakeList.txt for ubuntu and bython boost
View CMakeList.txt
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})
@marcinwol
marcinwol / example.cpp
Created Nov 5, 2015
Boost python vector to py list and py list to vector
View example.cpp
#include <iostream>
#include <vector>
#include <memory>
#include "boost/shared_ptr.hpp"
#include "boost/python.hpp"
#include "boost/python/stl_iterator.hpp"
using namespace std;
@marcinwol
marcinwol / compilemonero.sh
Last active Jun 10, 2018
Compile latest bitmonero source on Ubuntu 14.04
View compilemonero.sh
# 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
@marcinwol
marcinwol / nslookup
Last active Aug 29, 2015
Check ip address of for a webpave
View nslookup
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
@marcinwol
marcinwol / setup_proxychains-ng.sh
Last active Feb 26, 2020
Setup and test proxychains-ng on Ubuntu 14.04
View setup_proxychains-ng.sh
# 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
@marcinwol
marcinwol / compile_monero.sh
Created Aug 16, 2015
Ubuntu 14:04: compile CPUMiner/minerd (forked by LucasJones & Wolf) for Monero mining
View compile_monero.sh
# 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/
@marcinwol
marcinwol / startgimp.py
Last active Aug 29, 2015
Start gimp from IrfanView in Ubuntu
View startgimp.py
#!/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 '
@marcinwol
marcinwol / startirfan.py
Last active Aug 29, 2015
Start IrfanView in Linux with input file
View startirfan.py
#!/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
@marcinwol
marcinwol / return_value.cpp
Created Jul 3, 2015
Example of returning values from threads
View return_value.cpp
/**
* Example of returning a value from threads
*/
#include <iostream>
#include <vector>
#include <mutex>
#include <thread>
using namespace std;