View cryptoparts.sql
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
-- The SQLite database file is in STMCube installation, cube-finder-db.db | |
select * from ( | |
select substr(rpn,1,length(rpn)-2) as rpn, --remove last 2 letters of RPN which are memory size | |
core, featurename, featureitemname | |
from ( | |
select replace(replace(rpn,'-A',''),'-X','') as rpn, --squash minor variants | |
strValue as core, f.name featurename, fi.item featureitemname | |
from cpn | |
join cpn_has_attribute cha on cha.cpn_id=cpn.id |
View Win_docker_refs.txt
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
https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/windows-builder | |
https://github.com/search?q=gcr.io+ltsc2019&type=Code |
View Vagrantfile
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
Vagrant.configure("2") do |config| | |
config.vm.box = "gusztavvargadr/visual-studio" | |
config.vm.box_version = "2019.0.2006" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = true | |
vb.memory = "8192" | |
vb.cpus = 6 | |
vb.customize ["modifyvm", :id, "--accelerate3d", "on"] | |
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"] | |
vb.customize ["setextradata", "global", "GUI/MaxGuestResolution", "any"] |
View gist:bf95571516cc49d0100030505f95c9b5
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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
View const_strcmp.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
// https://godbolt.org/z/5G3Ah3 | |
// API: constexpr int const_strcmp( "foo", "bar" ); | |
// Much more readable version here: https://gist.github.com/kaidokert/dfc08be8e75a3fc650d3daf8e89c3fe9 | |
// but that doesn't work with GCC before version 7 | |
#include <cstddef> | |
#include <utility> | |
namespace detail { |
View const_str_len.hpp
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
// https://godbolt.org/z/uu4TMP | |
// API: constexpr size_t const_strlen( "foo" ); | |
// Much more readable version here: https://gist.github.com/kaidokert/dfc08be8e75a3fc650d3daf8e89c3fe9 | |
// but that doesn't work with GCC before version 7 | |
#include <utility> //std::forward | |
#include <cstddef> //std::size_t | |
namespace detail { | |
template<size_t COUNTER, typename T> |
View const_str_funcs.hpp
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
constexpr bool is_str_end(const char *t) { | |
return !(t) || !(*t); | |
} | |
constexpr int recursive_cstr_len(const char * t) { | |
return is_str_end(t) ? | |
0 : | |
1 + recursive_cstr_len(t + 1); | |
} |
View CoverageConfig.cmake
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
function(extend_custom_config_flags added_conf original_conf flags) | |
set(CMAKE_C_FLAGS_${added_conf} "${CMAKE_C_FLAGS_${original_conf}} ${flags}" CACHE STRING "" FORCE) | |
set(CMAKE_CXX_FLAGS_${added_conf} "${CMAKE_CXX_FLAGS_${original_conf}} ${flags}" CACHE STRING "" FORCE) | |
set(CMAKE_EXE_LINKER_FLAGS_${added_conf} "${CMAKE_EXE_LINKER_FLAGS_${original_conf}} ${flags}" CACHE STRING "" FORCE) | |
set(CMAKE_SHARED_LINKER_FLAGS_${added_conf} "${CMAKE_SHARED_LINKER_FLAGS_${original_conf}} ${flags}" CACHE STRING "" FORCE) | |
set(CMAKE_MODULE_LINKER_FLAGS_${added_conf} "${CMAKE_MODULE_LINKER_FLAGS_${original_conf}} ${flags}" CACHE STRING "" FORCE) | |
set(CMAKE_STATIC_LINKER_FLAGS_${added_conf} "${CMAKE_STATIC_LINKER_FLAGS_${original_conf}} " CACHE STRING "" FORCE) | |
endfunction() | |
if(True) |
View gist:b4f7bca1e6e496aa61b80686ac991bb6
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
# install yq.readthedocs.io | |
find . -iname "*xml" -exec sh -c 'xq . {} | yq -S -y . > `dirname {}`/`basename {} .xml`.yaml' \; |
View re_snippet.py
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
callers = {} | |
def _ghetto_compile(pattern, flags=0): | |
import inspect | |
try: | |
frame = '{}'.format(inspect.currentframe().f_back.f_code) | |
val = callers.setdefault(frame,0) | |
callers[frame] = val + 1 | |
# print(frame) | |
if 'rest_framework.py' in frame: |
NewerOlder