This file contains hidden or 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
#!/bin/sh | |
INFO=$(xwininfo -frame) | |
WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+') | |
WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' ) | |
ffmpeg -f x11grab -y -r 60 -s $WIN_GEO -i :0.0+$WIN_XY -f alsa -i pulse -crf 18 -preset ultrafast -threads 8 -async 5000 $1.mkv |
This file contains hidden or 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
#ifndef SSVU_PREALLOCATOR | |
#define SSVU_PREALLOCATOR | |
#include <vector> | |
#include <stack> | |
#include <algorithm> | |
#include <functional> | |
#include <stdexcept> | |
#include <cmath> | |
#include "SSVUtils/Global/Typedefs.h" |
This file contains hidden or 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
#ifndef VEEJSON | |
#define VEEJSON | |
#include <string> | |
#include <vector> | |
#include <unordered_map> | |
#include <functional> | |
#include <boost/regex.hpp> | |
namespace ssvu |
This file contains hidden or 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
template<Idx TIdx, Idx TSize, typename T, typename... TArgs, typename Func> typename std::enable_if<(TSize == 1)>::type mapHelper(Obj& mObj, const std::tuple<TArgs...>& mTuple) | |
{ | |
set(mObj, std::get<0>(std::get<TIdx>(mTuple)), std::get<1>(std::get<TIdx>(mTuple))); | |
} | |
template<Idx TIdx, Idx TSize, typename T, typename... TArgs, typename Func> typename std::enable_if<(TSize >= 1)>::type mapHelper(Obj& mObj, const std::tuple<TArgs...>& mTuple) | |
{ | |
set(mObj, std::get<0>(std::get<TIdx>(mTuple)), std::get<1>(std::get<TIdx>(mTuple))); | |
mapHelper<TIdx + 1, TSize - 1, T>(mObj, mTuple); | |
} | |
template<typename T, typename... TArgs> inline static void map(Obj& mObj, const std::tuple<TArgs...>& mTuple) { Internal::mapHelper<0, sizeof...(TArgs), T>(mObj, mTuple); } |
This file contains hidden or 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
#!/bin/bash | |
sudo echo "pass" | |
folder="./qt-creator/" | |
mkdir ${folder} | |
git clone "https://git.gitorious.org/qt-creator/qt-creator.git" ${folder} | |
(cd ${folder} && git stash && git pull -f origin master && qmake-qt5 -r && make -j8 && sudo make install -j8 INSTALL_ROOT=/usr/) |
This file contains hidden or 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
#!/bin/bash | |
sudo echo "pass" | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk ./llvm | |
cd ./llvm/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk ./clang | |
cd ../../llvm/tools/clang/tools | |
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra | |
cd ../../../../llvm/projects | |
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt |
This file contains hidden or 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
#!/bin/bash | |
KEY="" | |
ffmpeg -f x11grab -s 1920x1080 -r 20 -i :0.0+1680,0 -f alsa -ac 2 -i pulse -c:v libx264 -preset ultrafast -pix_fmt yuv420p -s 1920x1080 -threads 4 -acodec libmp3lame -ar 22050 -qscale 3 -b 712000 -bufsize 512k -af aresample=44100 -f flv "rtmp://live-ams.twitch.tv/app/$KEY" |
This file contains hidden or 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) 2013 Vittorio Romeo | |
// License: Academic Free License ("AFL") v. 3.0 | |
// AFL License page: http://opensource.org/licenses/AFL-3.0 | |
#ifndef SSES_ENTITY | |
#define SSES_ENTITY | |
#include "SSVEntitySystem/Core/Manager.h" | |
#include "SSVEntitySystem/Core/Component.h" | |
#include "SSVEntitySystem/Global/Typedefs.h" |
This file contains hidden or 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
// Consider these code snippets: | |
struct Test { Test() { thread([this]{ /* do something */; }).detach(); } | |
int main() | |
{ | |
Test{}; // <-- variable dies here! The "do something" inside the detached | |
// thread doesn't work as expected (undefined behavior?) | |
while(true) { this_thread::sleep(milliseconds(1)); } | |
} |
This file contains hidden or 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
#!/bin/bash | |
#g++ "$@" | |
clang++ -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wcomment -Wchar-subscripts -Wenum-compare -Wformat -Wimplicit -Wimport -Winline -Wlarger-than- -Wmissing-declarations -Wnested-externs -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wsynth -Wtypename-missing -Wuninitialized -Wunused -Wwrite-strings "$@" #-fsanitize=address -g -O0 |