MongoDB Crash Course 2022 < TODO: Add Video Link
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 Tuple> void print_tuple(const Tuple& t) | |
| { | |
| return [&]<std::size_t... Is>(std::index_sequence<Is...>) { | |
| ((std::cout << (Is == 0 ? "" : ", ") << std::get<Is>(t)), ...); | |
| }(std::make_index_sequence<std::tuple_size_v<Tuple>>()); | |
| } | |
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 <typeinfo> | |
| #include <cxxabi.h> | |
| template <typename T> struct ClassName | |
| { | |
| ClassName(T& obj) : _obj(obj) {} | |
| std::string getClassName() const | |
| { | |
| int status = 0; | |
| // __cxa_demangle returns a pointer to a malloc'ed buffer |
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
| mkdir ~/l && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C ~/l | |
| eval "$(~/l/bin/brew shellenv)" | |
| brew update --force --quiet | |
| chmod -R go-w "$(brew --prefix)/share/zsh" |
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
| package des.c5inco.cardswipecompose | |
| import androidx.compose.animation.core.Animatable | |
| import androidx.compose.animation.core.CubicBezierEasing | |
| import androidx.compose.animation.core.LinearOutSlowInEasing | |
| import androidx.compose.animation.core.animateDpAsState | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.calculateTargetValue | |
| import androidx.compose.animation.core.keyframes | |
| import androidx.compose.animation.splineBasedDecay |
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
| #Run build-v8.sh to setup deps. | |
| gn gen "--args=is_clang=true is_component_build=false v8_static_library=true use_custom_libcxx=false target_cpu=\"x64\"" out.gn/x64.Release | |
| ninja -C out.gn/x64.Release/ |
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
| version: '3' | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy | |
| labels: | |
| com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" | |
| container_name: nginx-proxy | |
| restart: unless-stopped | |
| ports: |
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
| { | |
| "USD": { | |
| "symbol": "$", | |
| "name": "US Dollar", | |
| "symbol_native": "$", | |
| "decimal_digits": 2, | |
| "rounding": 0, | |
| "code": "USD", | |
| "name_plural": "US dollars" | |
| }, |
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
| Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
| a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
| expire & throw a strange error. | |
| Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
| In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
| Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
| All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
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 | |
| # set values for certificate DNs | |
| # note: CN is set to different values in the sections below | |
| ORG="000_Test_Certificates" | |
| # set values that the commands will share | |
| VALID_DAYS=360 | |
| CA_KEY=ca.key | |
| CA_CERT=ca.crt |
NewerOlder