Skip to content

Instantly share code, notes, and snippets.

// g++ test.cpp --std=c++11 -lpthread -O2
//#ifdef WIN32 <- stdafx breaks this ifdef...
//#include "stdafx.h"
//#endif
#include <iostream>
#include <atomic>
#include <thread>
#include <vector>
@Hsilgos
Hsilgos / extensions
Created June 16, 2013 18:28
Some file extensions
C++ files:
*.h;*.hpp;*.hxx;*.c;*.cpp;*.cxx;*.c++;*.h++
@Hsilgos
Hsilgos / pocketbook.rst
Last active November 19, 2023 16:14
Setup enviroment for PocketBook SDK

Setup enviroment for PocketBook SDK

  1. Instal x86 version of Debian or Ubuntu.
  2. Download x86 SDK from this site: http://pbsdk.vlasovsoft.net/ (filename: pbsdk-linux-1.0.7_i386.deb).
  3. Install this package
  4. run 'ldconfig /usr/lib32' as root.
  5. Now you will be able to compile demos and run it in emulator:
  • copy any example (e.g. calc) from /usr/local/pocketbook/sources to you working directory ("DIR");
@Hsilgos
Hsilgos / Open_cygwin.rst
Last active December 17, 2015 00:29
Cygwin

How to open cygwin wherever you want

Add "bash.exe" to Total Commander's panel. Press right button on icon, then menu "Change..." (Изменить...). Fill field "Parameters", enter:

--login -i -c 'cd `cygpath $*`;bash' bash %P

OR

Place bat file where you want to open cygwin console and put down next script:

@Hsilgos
Hsilgos / redist_dbg.rst
Created May 5, 2013 18:30
Create redistributable package debug

How to create redistributable package debug

  1. Create new project Visual Studio-> New Project -> Other Project Types -> Setup Project -> Ok.
  2. Project -> Add -> Merge Module...
  3. Add Microsoft_VC90_DebugCRT_x86.msm & policy_9_0_Microsoft_VC90_DebugCRT_x86.msm.
  4. Select Release & Build -> Rebuild Solution.
  5. Package will be at %project_name%.msi

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.