Skip to content

Instantly share code, notes, and snippets.

@pouyaardehkhani
pouyaardehkhani / Keep Google Colab from disconnecting markdown.md
Last active May 8, 2024 11:49
Keep Google Colab from disconnecting

Problem

I was training a deep learning model on Google Colab. I had to go somewhere for an emergency work. When I came back, I realized that Colab was disconnected; Therefore, I had to run the whole model again.

Solution

I searched on the Internet to solve this problem. I noticed that Colab will be disconnected if you don't click on the page. Here is an answer that I find:

function ClickConnect() {
  console.log('Working')
 document
@ArimSteph05
ArimSteph05 / Hello.c
Last active May 8, 2024 11:49
Mon Hello world
int main()
{
printf("Bonjour tout le monde !");
return 0;
}
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 8, 2024 11:48
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@mixalbl4-127
mixalbl4-127 / VNC_Server_On_Ubuntu_22.04LTS.md
Last active May 8, 2024 11:45 — forked from indyfromoz/VNC_Server_On_Ubuntu_22.04LTS.md
VNC+xfce4 setup on Ubuntu server 22.04 LTS

Setup

Install xfce4

sudo apt update
sudo apt install xfce4 xfce4-goodies

Install TigerVNC -

@yufengwng
yufengwng / arch_cheatsheet.txt
Last active May 8, 2024 11:43
Arch Linux Commands Cheatsheet
pacman
======
view logs: /var/log/pacman.log
update system
# pacman -Syu
list installed packages
# pacman -Q
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 11:42
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@tsaarni
tsaarni / README.md
Last active May 8, 2024 11:42
How to connect to Azure AKS Kubernetes node VM by SSH

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@Adem68
Adem68 / flutter-project-line.md
Last active May 8, 2024 11:41
How many lines does your Flutter project have?
  • Open terminal and go to your project's lib folder. After that run the command below.
  • find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -name '*.gr.dart' ! -name '*.gen.dart' | xargs wc -l

Thanks @AcetylsalicylicAcid for excluding generated files.

@iThalir
iThalir / DAY-02- ASSIGNMENT
Created May 8, 2024 11:39
ARAVINDH- CKA ANSWERS
CERTIFICATION ASKED QUESTIONS
1. Create a new deployment called web-proj-268 with image nginx:1.16 and one replica.
Next, upgrade the deployment to version 1.17 using rolling update.
Make sure that the version upgrade is recorded in the resource annotation.
$kubectl create deploy web-proj-268 --image=nginx:1.16 --replicas=1
$kubectl get deploy -o wide
$kubectl set image deploy/web-proj-268 nginx=nginx:1.17
@jinsley8
jinsley8 / google-tag-manager.php
Created February 13, 2022 17:53
Enqueue Google Tag Manager script without tracking Admin
/**
* Enqueue Google Tag Manager script
*
*/
/* Add Google Tag Manager javascript code as close to
the opening <head> tag as possible
=====================================================*/
define("GTM_TAG","GTM-XXXXXX", false); // Replace with GTM tracking ID