Skip to content

Instantly share code, notes, and snippets.

View grogy's full-sized avatar

Václav Makeš grogy

  • Contractor + consultant PHP ecosystem.
  • Czech Republic
View GitHub Profile
@grogy
grogy / code-file.cpp
Last active December 14, 2015 10:19
C++ Hello word.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello word!" << endl;
return 0;
}
@grogy
grogy / code.cpp
Created March 11, 2013 20:08
C++ write to binary file.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream out;
out.open("out.bin", ios::out | ios::binary | ios::trunc);
@grogy
grogy / code.cpp
Last active March 16, 2025 22:39
C++ read from binary file.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream in;
in.open("in.bin", ios::in | ios::binary);
@grogy
grogy / code.cpp
Created March 14, 2013 21:19
C++ - check file for open.
/**
* Check file for read / write
* (isForOpen) ? "read" : "write"
*/
bool checkFile(const char * fileName, bool isOnlyRead)
{
if (isOnlyRead) {
ifstream inFile;
inFile.open(fileName, ios::in);
if (inFile.is_open()) {
@grogy
grogy / code.cpp
Created May 6, 2013 05:21
Instalace a hello-word v ncurses, C++.
// kód z http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html
#include <ncurses.h>
int main( void )
{
initscr();
printw("Hello World !!!");
@grogy
grogy / version.md
Last active December 18, 2015 20:39
Version of PHP.
@grogy
grogy / readme.md
Created July 22, 2013 00:19
Grunt.
@grogy
grogy / structure.tex
Created August 25, 2013 07:49
LaTeX: Základní struktura pro český dokument.
\documentclass[11pt]{article} % styl dokumentu
\usepackage[utf8]{inputenc} % kodovani
\usepackage[czech]{babel} % nastaveni ceskeho formatovani (napr. pro uvozovky)
\usepackage{amsmath,amsfonts,amssymb} % balicky pro matematiku
\begin{document}
% telo dokumentu
\end{document}
@grogy
grogy / key-user.json
Created January 25, 2014 23:01
Sublime Text - custom settings.
[
// multi-cursor
{
"keys": ["ctrl+shift+up"],
"command": "select_lines",
"args": {"forward": false}
},
{
"keys": ["ctrl+shift+down"],
"command": "select_lines",