Skip to content

Instantly share code, notes, and snippets.

@oboff
oboff / defer.hpp
Created February 18, 2024 06:51 — forked from pmttavara/defer.hpp
The definitive defer implementation for C++. Syntax: defer { statements; };
#ifndef defer
struct defer_dummy {};
template <class F> struct deferrer { F f; ~deferrer() { f(); } };
template <class F> deferrer<F> operator*(defer_dummy, F f) { return {f}; }
#define DEFER_(LINE) zz_defer##LINE
#define DEFER(LINE) DEFER_(LINE)
#define defer auto DEFER(__LINE__) = defer_dummy{} *[&]()
#endif // defer
@oboff
oboff / log.md
Created June 12, 2016 07:25 — forked from mattstauffer/log.md
Introduction to Gistlog

So, you might be asking yourself, what is Gistlog?

Gistlog is a blogging "platform" for people who want to quickly write and publish content, in Markdown, and don't want to bother with yet another platform and yet another login and yet another group hoarding their content. With Gistlog, you use your pre-existing Github login, you store the data in your own Github account, and you can publish with a single click.

Using Gistlog

  1. Create a public gist with a single file using Markdown. Set the gist description to be the title of your blog post
  2. Copy the gist URL, and paste it into the text box on the Gistlog home page
  3. Copy your resulting URL and share it as your blog post--note that it will be in the form of http://gistlog.co/your-github-username/gist-id
  4. If you want to have your own Gistlog landing page (e.g. gistlog.co/mattstauffer), read all about it
@oboff
oboff / thinkpad-trackpoint-speed.mkd
Created October 9, 2015 05:34 — forked from noromanba/thinkpad-trackpoint-speed.mkd
change pointer speed of Trackpoint on Thinkpad T60

Thinkpad Trackpoint speed configuration on Linux

change pointer speed of Trackpoint on Thinkpad

works well T60 with Ubuntu 13.10 and Ubuntu 14.04 LTS

how to change

speed configration by write integer to file

0 <- slower ------------ faster -> 250