Settings > Update & Security > Windows Update > Advanced Options:
- Turn off the p2p file transfer [Recommend]
- Limit the p2p transfer to PCs on the local network
| -- Copied from: https://alexplescan.com/posts/2024/08/10/wezterm/ | |
| local wezterm = require 'wezterm' | |
| local config = wezterm.config_builder() | |
| local act = wezterm.action | |
| config.font_size = 13 | |
| config.window_background_opacity = 0.9 | |
| config.macos_window_background_blur = 30 |
wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.| #include <cudnn.h> | |
| #include <cuda.h> | |
| #include <iostream> | |
| #include <chrono> | |
| #include <thread> | |
| int main(int argc, char const *argv[]) { | |
| // cuda initialization via cudaMalloc | |
| size_t limit = 0; |
| // Place this script in Assets > Editor | |
| public class DisablingBitcodeiOS | |
| { | |
| [PostProcessBuild( 1000 )] | |
| public static void PostProcessBuildAttribute( BuildTarget target, string pathToBuildProject ) | |
| { | |
| if(target == BuildTarget.iOS) | |
| { | |
| string projectPath = PBXProject.GetPBXProjectPath(pathToBuildProject); |
| // credit: https://stackoverflow.com/a/56334648 | |
| #include <queue> | |
| #include <deque> | |
| #include <iostream> | |
| template <typename T, int MaxLen, typename Container=std::deque<T>> | |
| class FixedQueue : public std::queue<T, Container> { | |
| public: | |
| void push(const T& value) { | |
| if (this->size() == MaxLen) { |
| function [ ] = matlab2opencv( variable, fileName, flag ) | |
| %MATLAB2OPENCV Save `variable` to yml/xml file | |
| % fileName: filename where the variable is stored | |
| % flag: `a` for append, `w` for writing. | |
| % Detailed explanation goes here | |
| [rows cols] = size(variable); | |
| % Beware of Matlab's linear indexing | |
| variable = variable'; |
| #!/usr/bin/env bash | |
| # Things to do after install ArchLinux (2012.12.01) | |
| pacman --noconfirm -S sudo | |
| # Enabled archlinuxfr repo | |
| arch=$(uname -m) | |
| sudo cp /etc/pacman.conf /etc/pacman.conf.bak | |
| echo "" >> /etc/pacman.conf | |
| echo "[archlinuxfr]" >> /etc/pacman.conf |
| -- LUA WARNINGS | |
| -- Array starts from index 1 | |
| -- obj.func() is equivalent to obj:func() | |
| -- Loop: | |
| -- for start_, end_ do | |
| -- end | |
| -- Condition: | |
| -- if <condition> then | |
| -- end | |
| -- Function: |
| echo "Setup the workspace" | |
| # pacman -S sudo | |
| # install yay | |
| git clone https://aur.archlinux.org/yay.git | |
| cd yay | |
| makepkg -si | |
| cd .. & rm -rf yay | |
| # essential dev tools |