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
#pragma once | |
#include <functional> | |
#include <future> | |
#include <chrono> | |
#include <thread> | |
#include <type_traits> | |
template <class V> | |
class JoiningFuture; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// ==UserScript== | |
// @name Reactor Idle HeatExchange fixer | |
// @namespace https://gist.github.com/Chronial/5981aff4706e6d59f1f5ff743cfe4350 | |
// @version 0.1 | |
// @description Fix heat exchanger in reactor idle | |
// @author Chronial | |
// @match http://reactoridle.com/ | |
// @grant none | |
// ==/UserScript== |
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
<?php | |
$ids = explode(',', $_GET['ids']); | |
$ids = array_filter($ids, 'is_numeric'); | |
$data = ask_api($ids); | |
foreach ($data as $k => $v){ | |
echo $k . ',' . ($v ? "True" : "False") . "\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
from django.conf import settings | |
from whitenoise.django import DjangoWhiteNoise | |
class DjangoCompressWhiteNoise(DjangoWhiteNoise): | |
def __call__(self, environ, start_response): | |
# Handle files generated on the fly by django-compressor | |
url = environ['PATH_INFO'] | |
if url.startswith(self.static_prefix) and url not in self.files: | |
if self.is_compressed_file(url): |
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
# use UTF8 | |
set -g utf8 | |
set-window-option -g utf8 on | |
# Set the default terminal mode to 256color mode. | |
set -g default-terminal "screen-256color" | |
# use fish shell | |
set-option -g default-shell "/usr/bin/fish" |
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
" Based on sensible.vim 1.1 | |
if exists('g:loaded_sensible') || &compatible | |
finish | |
else | |
let g:loaded_sensible = 1 | |
endif | |
if has('autocmd') | |
filetype plugin indent on |
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
from itertools import product | |
alice = lambda x: x | |
bob = lambda x: not x | |
print(all(alice(a) == b or bob(b) == a | |
for a, b in product([True, False], repeat=2))) |
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
uiae |
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/python -O | |
""" | |
Finds the branch all the commits have most likely been mode on | |
""" | |
import os | |
import sys | |
import re | |
from pprint import pprint |
NewerOlder