This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
template <typename Iter, typename T1> | |
inline auto tie_from(Iter it, T1& t1) | |
-> std::tuple<T1&> | |
{ | |
t1 = *it; | |
return std::tuple<T1&>(t1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
INTERVAL = 300 | |
import clouddns | |
import requests | |
try: | |
from gi.repository import GObject as gobject | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <vector> | |
template <typename V, typename T1> | |
inline void back_pusher(V& v, T1 t1) | |
{ | |
v.push_back(std::move(t1)); | |
} | |
template <typename V, typename T1, typename... T2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <functional> | |
template <typename... T> | |
using common_type_t = typename std::common_type<T...>::type; | |
template <typename T> | |
using remove_cv_t = typename std::remove_cv<T>::type; | |
template <bool, typename T, typename... U> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#line-edit | |
^A home | |
^E end | |
\ef word-right | |
\eb word-left | |
\ed word-delete | |
^W word-backspace | |
#env | |
LESS = -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <limits> | |
#include <climits> | |
#include <type_traits> | |
template <int bit> | |
struct fill_bits | |
{ | |
template <typename Int> | |
static constexpr auto apply(Int n) -> Int | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <limits> | |
#include <type_traits> | |
template <int bit> | |
struct or_shift | |
{ | |
template <typename Int> | |
static constexpr auto apply(Int n) -> Int | |
{ | |
return or_shift<bit / 2>::apply(n | (n >> bit)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <iostream> | |
#include <memory> | |
struct default_init_t {}; | |
default_init_t default_init; | |
template <typename T, typename = void> | |
struct make_unique; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import atexit | |
import os | |
import readline | |
import rlcompleter | |
hist_path = os.path.expanduser("~/.python/history") | |
readline.parse_and_bind("tab: complete") | |
readline.set_history_length(1000) | |
if os.path.exists(hist_path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# linux-gtk-bluecurve-theme.fc7 | |
# linux-gtk-bluecurve-theme.fc7/distinfo.i386 | |
# linux-gtk-bluecurve-theme.fc7/Makefile |