brew install ngrok #or snap install ngrok
ngrok config add-authtoken 2KQDERnnUjddPsWNMRhr3vsUeR1_3akBvNWQbgAMKNY8mH9ft
ngrok http <port>
sudo iptables -A INPUT -p tcp --dport 8888 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 8888:8890 -s 140.116.0.0/16 -j ACCEPT
sudo apt install openssh-server
systemctl enable ssh.service
sudo systemctl start sshd.service
document.designMode='on'
/Library/Developer/CommandLineTools/SDKs/MacOSX[MaxOS Version].sdk/usr/include/c++/v1/bits
or
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bits
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
curl -sSf https://sshx.io/get | sh && sshx
sudo apt install openssh-server
sudo systemctl enable ssh
sudo ufw allow ssh
sudo at 14:50 2024-02-04
[command]
Ctrl+D
sudo timedatectl set-timezone Asia/Taipei
pip freeze | xargs pip uninstall -y
ls /usr/bin/python3*
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
sudo update-alternatives --remove python3 /usr/bin/python3.9
sudo update-alternatives --config python3
pyenv install 3.10.6 # install a specific Python version
pyenv local 3.10.6 # set a specific Python version in the current directory
pyenv versions # show installed Python versions
pyenv install --list # show all available Python versions for installation
pip install speedtest-cli
pip install speedtest-cli --user
git commit --allow-empty -m 'trigger new CI check'
pipreqs . --force --savepath temp_requirements.txt
rm requirements.txt
while read line; do
pkg=$(echo $line | cut -d'=' -f1)
version=$(pip show $pkg 2>/dev/null | grep Version | head -1 | awk '{print $2}' )
echo "found $pkg $version"
if [ ! -z "$version" ]; then
echo "$pkg==$version" >> requirements.txt
fi
done < temp_requirements.txt
rm temp_requirements.txt
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up