Skip to content

Instantly share code, notes, and snippets.

View roman-smirnov's full-sized avatar
🚀
Inverting Singularities

Roman Smirnov roman-smirnov

🚀
Inverting Singularities
View GitHub Profile
@trusktr
trusktr / image-grid.md
Last active May 14, 2024 17:19
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@artivis
artivis / CMakeLists.txt
Last active April 22, 2019 15:41
[CMake] set cpp11-14
cmake_minimum_required(VERSION 2.8.3)
project(my_project)
# assuming this file is shipped within your project
# in 'project_root/cmake/cxx_support.cmake'
include(${PROJECT_SOURCE_DIR}/cmake/cxx_support.cmake)
# Assert the build was triggered with
# cpp11 flag, cash otherwise.
assert_cpp11_support()
@franz-josef-kaiser
franz-josef-kaiser / nano-shorts.md
Last active April 8, 2024 09:27
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@tausen
tausen / gist:4261887
Created December 11, 2012 20:30
pthread, sem_wait, sem_post example
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <semaphore.h>
sem_t semaphore;
void threadfunc() {
@JakeWharton
JakeWharton / ContractFragment.java
Created May 6, 2012 09:12
Base fragment to ensure the parent activity implements a contract interface.
/* Base fragment to ensure the parent activity implements a contract interface. */
public abstract class ContractFragment<T> extends Fragment {
private T mContract;
@Override
public void onAttach(Activity activity) {
try {
mContract = (T)activity;
} catch (ClassCastException e) {
throw new IllegalStateException(activity.getClass().getSimpleName()
@jachin
jachin / Recursively Delete Things.rst
Last active April 17, 2021 23:23
Recursively delete (some) files.

Recursively delete CVS directories:

find . -depth -name 'CVS' -exec rm -rf '{}' \; -print

Remove .svn directories from a git repository:

find . -depth -name '.svn' -exec git rm --cached -r '{}' \; -print

Remove .pyc files: