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
#include <functional> | |
#include <stdexcept> | |
#include <tuple> | |
#include <type_traits> | |
template <int Low, int High, int Mid = (Low + High) / 2> | |
inline constexpr auto _visit_at = nullptr; | |
template <int Low, int High, int Mid> | |
requires(Low > High) |
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
/* Copyright (C) 2002 by Jilles Tjoelker */ | |
/* revised by Zhihao Yuan, 2012 */ | |
#include <sys/types.h> | |
#include <sys/event.h> | |
#include <sys/time.h> | |
#include <err.h> | |
#include <fcntl.h> | |
#include <signal.h> |
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 <iostream> | |
// http://stackoverflow.com/questions/537303/binary-literals | |
template<char... digits> | |
struct conv2bin; | |
template <char... digits> | |
constexpr int operator"" _b() { | |
return conv2bin<digits...>::value; | |
} |
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 <ostream> | |
#include <stdexcept> | |
#include <system_error> | |
#include <type_traits> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdio.h> |
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 <algorithm> | |
#include <vector> | |
#include <iterator> | |
#include <iostream> | |
int main() | |
{ | |
std::vector<int> v; | |
// instead of asking for iota_n(std::back_inserter(v), 10, 1); | |
std::generate_n(back_inserter(v), 10, [n = 0]() mutable { return ++n; }); |
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 <algorithm> | |
#include <assert.h> | |
#include <cmath> | |
#include <errno.h> | |
#include <iterator> | |
#include <stdlib.h> | |
namespace csv | |
{ |
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
--- driver/lock.c~ 2011-09-24 19:13:50.000000000 -0500 | |
+++ driver/lock.c 2012-09-26 05:03:57.116385782 -0500 | |
@@ -686,7 +686,7 @@ make_passwd_window (saver_info *si, | |
si->passwd_dialog, cmap, | |
pw->background, | |
&pw->logo_pixels, &pw->logo_npixels, | |
- &pw->logo_clipmask, True); | |
+ &pw->logo_clipmask, -1); | |
} | |
else /* On successive prompts, just resize the window */ |
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
[alias] | |
st = status | |
fix = commit --amend -C HEAD | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
discard = reset HEAD -- |
NewerOlder