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
| alias svndiff="svn diff | colordiff | less" |
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
| void Template::recurseApply(PropertyTree& tree) const { | |
| for (auto& child : tree) { | |
| if (!child.second.empty()) { | |
| recurseApply(child.second); | |
| continue; | |
| } | |
| /* legge il valore */ | |
| auto&& value = child.second.get_value<std::string>(); |
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
| $.fn.dt_smartPreloader = function (action) { | |
| var args = arguments; | |
| return this.each(function (index, self) { | |
| var $self = $(self); | |
| var visibility = $self.css('visibility'); | |
| /* wrap $self with a preloader div */ | |
| $self.wrap($('<div>').addClass('preloader-mask ajaxLoading')); | |
| var $preloader = $self.parent(); |
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
| cmake_minimum_required(VERSION 3.3) | |
| project(xxx) | |
| file(GLOB_RECURSE Headers ${CMAKE_SOURCE_DIR}/src/*.h) | |
| add_custom_target(copy) | |
| foreach(HEADER ${Headers}) | |
| STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/src/([^/]*)/src/(.*)$" "\\1/\\2" DST_HEADER ${HEADER}) | |
| add_custom_command(TARGET copy PRE_BUILD |
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
| ffmpeg -i ../screencast-20151206-190854.mp4 -vf fps=5,scale=640:-1:flags=lanczos,palettegen palette.png | |
| ffmpeg -i ../screencast-20151206-190854.mp4 -i palette.png -filter_complex "fps=5,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
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
| gnome, compiz config | |
| cerca window rules | |
| in fullscreen, add: class=Gnome-terminal |
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
| dd'apI"`` |
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
| function! ResizeCmdHeight() | |
| if &columns < 120 | |
| set cmdheight=2 | |
| else | |
| set cmdheight=1 | |
| endif | |
| endfunction | |
| augroup ResizeCmdOnVimResized | |
| autocmd! |
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 <typename T> | |
| using Checker = std::function<bool(T)>; | |
| template <typename T> | |
| class Param { | |
| public: | |
| Param(std::string, Checker<T>) { | |
| } | |
| Param(std::string) { |
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
| #include <openssl/bio.h> | |
| #include <openssl/buffer.h> | |
| #include <openssl/evp.h> | |
| using RawData = std::vector<uint8_t>; | |
| RawData encode(const RawData& input) { | |
| BIO* b64 = BIO_new(BIO_f_base64()); | |
| BIO* bio = BIO_new(BIO_s_mem()); | |
| bio = BIO_push(b64, bio); |