Skip to content

Instantly share code, notes, and snippets.

@pashazz
pashazz / configure
Last active February 12, 2019 13:30
RethinkDB building details
* Detecting system configuration
Bash: 5.0.0(1)-release
Use ccache: no
C++ Compiler: GCC 8.2.1 (/usr/bin/c++)
Host System: x86_64-pc-linux-gnu
Build System: Linux 4.19.20-1-MANJARO x86_64
Cross-compiling: no
Host Operating System: Linux
Build Architecture: x86_64
C++11: ok
@pashazz
pashazz / wallpaper.py.patch
Last active January 9, 2017 08:55
patch -p1 /usr/lib/python3.6/site-packages/wpreddit/wallpaper.py wallpaper.py.patch
--- wallpaper.py.old 2017-01-09 11:05:16.554035609 +0300
+++ wallpaper.py 2017-01-09 11:34:56.456909197 +0300
@@ -51,6 +51,15 @@
os.system("xfconf-query -c xfce4-desktop -p " + prop + " -s 'true'")
elif de in ["lubuntu", "Lubuntu"]:
os.system("pcmanfm -w %s" % path)
+ elif de in ["/usr/share/xsessions/plasma"]:
+ files = os.listdir(config.walldir)
+ for file in files:
+ if re.search('wallpaper[0-9]+\.jpg', file) is not None:
COLOR_0=1D1F21
COLOR_1=A54242
COLOR_2=8C9440
COLOR_3=DE935F
COLOR_4=5F819D
COLOR_5=85678F
COLOR_6=5E8D87
COLOR_7=C5C8C6
COLOR_8=373B41
COLOR_9=CC6666
void printSet(const MyStringSet &s)
{
cout << '{';
for(auto iter=s.cbegin(); iter!=s.cend();)
{
cout << '"';
cout << *iter;
cout << '"';
if(++iter!=s.end())
cout << ", ";
@pashazz
pashazz / func.cpp
Created October 16, 2014 17:07
Lab3: extract
using namespace std;
/**
* @class MinElementComparison
Compare two int lists in the folowing way:
Ascending order of their minimum elements
*/
struct MinElementComparison{
std::string decimalToBinary(const std::string &src)
{
/*
decimalToBinary: returns binary representation of number in src, or Error.
*/
istringstream myistream(src);
int decRepr = 0;
if(!(myistream >> decRepr))
return string("Error!");
void numbersToBinary(string &src)
{
for (string::iterator iter = src.begin(); iter != src.end(); iter++)
{
if (isdigit(*iter))
{
string::iterator numberStart = iter++; //numberStart = iter;
while (src.end() != iter && (isdigit(*iter)))
{
iter++;
using namespace std;
void decToBinary_helper(string &str, int dec);
std::string decimalToBinary(const std::string &src)
{
/*
decimalToBinary: returns binary representation of number in src, or Error.
*/
istringstream myistream(src);
int decRepr = 0;
void decToBinary_helper(string &str, int dec);
std::string decimalToBinary(const std::string &src)
{
/*
decimalToBinary: returns binary representation of number in src, or Error.
*/
istringstream myistream(src);
int decRepr = 0;
if(!(myistream >> decRepr))
void numbersToBinary(string &src)
{
for (string::iterator iter = src.begin(); iter != src.end(); iter++)
{
if (isdigit(*iter))
{
string::iterator numberStart = iter++; //numberStart = iter;
while (src.end() != iter && (isdigit(*iter)))
{
iter++;