As configured in my dotfiles.
start new:
tmux
start new with session name:
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# | |
# STL GDB evaluators/views/utilities - 1.03 | |
# | |
# The new GDB commands: | |
# are entirely non instrumental | |
# do not depend on any "inline"(s) - e.g. size(), [], etc | |
# are extremely tolerant to debugger settings | |
# | |
# This file should be "included" in .gdbinit as following: | |
# source stl-views.gdb or just paste it into your .gdbinit file |
Hello, brethren :-)
As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".
#include <glm/gtx/string_cast.hpp> | |
.. | |
.. | |
glm::mat4 mat; | |
.. | |
.. | |
std::cout << glm::to_string(mat) << std::endl; |
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20 | |
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10 | |
update-alternatives --config ld | |
ld --version | |
GNU gold | |
export CPP=cpp-5 gcc-5 g++-5 | |
env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release |
var http = require('http'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var AUDIOFILE = "./audio.ogg"; | |
function serveWithRanges(request, response, content) { | |
var range = request.headers.range; | |
var total = content.length; | |
var parts = range.replace(/bytes=/, "").split("-"); |
Вопросы на rendering engineer Huawei | |
- в чем разница между forward и deferred rendering? Какие плюсы и минусы у каждого из двух подходов (производительность / ограничения) | |
- какие способы рендерить прозрачную геометрию вы знаете? | |
- что такое алиасинг? Из-за чего он происходит? Какие есть алгоритмы антиалиасинга? Как реализован встроенный MSAA и чем он лучше SSAA? | |
- как работает TAA и какие дефекты он вызывает? | |
- как оптимально рисовать большое число объектов на экране? Какие есть способы отсечения? (на GPU и CPU) | |
- как работает Kd-дерево, bvh, bsp? Какая у них асимптотика и от чего она зависит? | |
- для чего нужны mip-уровни текстур и фильтрация текстур? |
# save it as /etc/profile.d/ssh-telegram.sh | |
# use jq to parse JSON from ipinfo.io | |
# get jq from here http://stedolan.github.io/jq/ | |
USERID="<target_user_id>" | |
KEY="<bot_private_key>" | |
TIMEOUT="10" | |
URL="https://api.telegram.org/bot$KEY/sendMessage" | |
DATE_EXEC="$(date "+%d %b %Y %H:%M")" | |
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt' | |
if [ -n "$SSH_CLIENT" ]; then |
This article is now published on my website: A one-off git repo server.