Skip to content

Instantly share code, notes, and snippets.

View vochicong's full-sized avatar
🐒
NLP/ML/AI

Cong vochicong

🐒
NLP/ML/AI
View GitHub Profile
0. DONT try to install "Ubuntu 21.10" from ISO because kernel 5.13 has bug and installer doesnt see NVME!
Details: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1942624
https://askubuntu.com/questions/1369636/ssd-nvme-m-2-not-detected-on-ubuntu-21-10-during-installation
1. Install w10 as regular
1.1. Download MediaCreationTool21H2.exe from https://www.microsoft.com/ru-ru/software-download/windows10
1.2. Write ISO to USB flash
1.3. Install it
1.4. Only this image Windows 10 x64 Pro works fine with UEFI Activation Key !!!
1.5. Any DRIVERS for GS66-Stealth-11UH-054PL on POLAND MSI Site here: https://pl.msi.com/Laptop/GS66-Stealth-11UX/support?sku_id=68905
@balmeida-nokia
balmeida-nokia / wsl2_ciscoanyconnect_workaround.md
Last active May 3, 2024 02:43 — forked from pyther/wsl2_ciscoanyconnect_workaround.md
WSL 2 Cisco AnyConnect Networking Workaround

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Acknowledges

@vochicong
vochicong / .tmux.conf
Last active July 8, 2022 23:47
code-shell, tmux settings for VSCode's terminals
set -g mouse on
set -g status on
set-window-option -g mode-keys vi
set-option -g default-command "/usr/bin/bash"
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind-key -n WheelDownPane select-pane -t= \; send-keys -M
unbind C-b
@c-bata
c-bata / Makefile
Last active July 13, 2020 19:14
有名どころ最適化ライブラリのPyPIダウンロード数調査
default: 01
01:
$(MAKE) -s ranking | tee ranking.md
ranking: TARGET ?= _ranking
ranking:
$(MAKE) -s ${TARGET} | jqfpy -c 'd = get(); {"package": d["package"], **d["data"]}' | jqfpy --slurp 'sorted(get(), key=lambda x: x["last_month"] + (4 * x["last_week"]), reverse=True)' | dictknife cat -i json -o md
_ranking: OPT ?= -f json
@ledell
ledell / kaggledays-sf_h2o_automl_6000.R
Last active March 3, 2022 03:02
KaggleDays SF: H2O AutoML solution
### Kaggle Days SF: Hackathon submission (8th place)
# I used the latest version of H2O (3.24.0.1)
# Latest stable always here: http://h2o-release.s3.amazonaws.com/h2o/latest_stable.html
# H2O 3.24.0.1: http://h2o-release.s3.amazonaws.com/h2o/rel-yates/1/index.html
# If you are a Python user, you can use the demo Python code available on the H2O AutoML User Guide
# instead: http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html
# Unfortunately it was a private competition, so the data is not publicly available!
@mollymerp
mollymerp / sshfs-gcp-instance-osx.md
Last active January 10, 2024 14:52
How to mount a GCP compute instance filesystem locally using `sshfs` on MacOS

How to mount a GCP compute instance filesystem locally using sshfs

This guide assumes that:

  • you already have an instance set up on GCP that you want to mount locally
  • the GCP CLI (gcloud) is installed on your local machine
  • you have authenticated locally to your google account gcloud auth login
  1. make sure your gcloud config is correct for the instance you're trying to access:
@yashkumaratri
yashkumaratri / Google Colab SSH
Created December 31, 2018 05:19
SSH into google colab
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
@vochicong
vochicong / .Brewfile
Last active November 20, 2019 07:05
.Brewfile
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
brew "docker"
brew "docker-compose"
brew "gist"
brew "git"
brew "hub"
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active September 24, 2021 09:53
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@psxvoid
psxvoid / delete-evicted-pods-all-namespaces.sh
Created August 6, 2018 14:41
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces