Skip to content

Instantly share code, notes, and snippets.

View nguyenlamlll's full-sized avatar
🚀
Working!

Lam Le nguyenlamlll

🚀
Working!
View GitHub Profile
@ShilGen
ShilGen / Fast_API_deploy.md
Last active May 27, 2025 08:15
how to deploy fast-api on ubuntu 22.04 for real project? (step-by-step tutorial)

Deploy a FastAPI app on Ubuntu 22.04 VPS

Ubuntu Nginx Gunicorn Python FastAPI

Deploying a FastAPI application on Ubuntu 22.04 for a real project involves several steps, including setting up the server, installing necessary software, configuring the application, and setting up a reverse proxy. Here's a step-by-step tutorial

@beekill95
beekill95 / tensorflow_wsl2.md
Created August 29, 2023 00:51
Installing Tensorflow in WSL2

Using conda to install cuda dependencies:

conda install -c conda-forge cudatoolkit=11.8.0
conda install -c "nvidia/label/cuda-11.8.0" cuda-nvcc

Install tensorflow and cuda utilities:

@mattyellen
mattyellen / UnityAsyncOperationAwaiter.cs
Created July 26, 2020 19:36
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
@kofemann
kofemann / postgres-cluster.yaml
Created May 1, 2020 16:41
Running postgres in kubernetes
#
# postgres cluster in kubernetes with max 8 replicas
#
# the master is always on ${host}-0
#
#
# postgres master/slave configuration
#
@jonrimmer
jonrimmer / switch-cases.directive.ts
Last active March 13, 2025 14:30
jrSwitchCases
import { Directive, Input, Host, TemplateRef, ViewContainerRef, OnInit, DoCheck } from '@angular/core';
import { NgSwitch } from '@angular/common';
@Directive({
selector: '[jrSwitchCases]'
})
export class SwitchCasesDirective implements OnInit, DoCheck {
private ngSwitch: any;
private _created = false;
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@yunjey
yunjey / download_flickr_image.py
Last active November 8, 2024 11:07
downloading images from flickr using python-flickr
# First, you should install flickrapi
# pip install flickrapi
import flickrapi
import urllib
from PIL import Image
# Flickr api access key
flickr=flickrapi.FlickrAPI('c6a2c45591d4973ff525042472446ca2', '202ffe6f387ce29b', cache=True)
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@dianjuar
dianjuar / Install update WordPress puglins directly.md
Last active April 7, 2025 23:03
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@jgsqware
jgsqware / kubeadm-install-offline.md
Last active January 22, 2025 09:34
Offline Kubeadm install

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2