Skip to content

Instantly share code, notes, and snippets.

@chranderson
chranderson / nvmCommands.js
Last active May 6, 2024 14:15
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@ChenYFan
ChenYFan / ip.txt
Created May 14, 2021 11:51
Vercel All IP
34.95.57.145 [加拿大 魁北克省蒙特利尔 Google 云计算数据中心]
13.49.54.242 [瑞典 斯德哥尔摩 Amazon 数据中心]
18.178.194.147 [日本 东京都东京 Amazon 数据中心]
52.79.72.148 [韩国 首尔 Amazon 数据中心]
35.180.16.12 [法国 巴黎 Amazon 数据中心]
18.206.69.11 [美国 弗吉尼亚州阿什本 Amazon 数据中心]
52.76.85.65 [新加坡 Amazon 数据中心]
18.130.52.74 [英国 伦敦 Amazon 数据中心]
35.202.100.12 [美国 Merit 网络公司]
35.195.188.93 [比利时 瓦隆大区圣吉斯兰 Google 云计算数据中心]

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@otkrsk
otkrsk / multiple-ssh-authkeys.md
Last active May 6, 2024 14:12
Add multiple SSH keys to the authorized_keys file to enable SSH authentication when connecting to a server.

Step 1: Generate first ssh key Type the following command to generate your first public and private key on a local workstation. Next provide the required input or accept the defaults. Please do not change the filename and directory location.

workstation 1 $ ssh-keygen -t rsa

Finally, copy your public key to your remote server using scp

@Ynng
Ynng / custom.css
Last active May 6, 2024 14:10
vscode vtuber logo
.editor-group-watermark > .letterpress{
background-image: url("https://raw.githubusercontent.com/Aikoyori/ProgrammingVTuberLogos/main/VSCode/VSCode-Thick.png") !important;
opacity: .75;
aspect-ratio: 3/2 !important;
}
@mingalevme
mingalevme / php-redis-custom-flags.sh
Created March 1, 2020 11:46
Installing PHP Redis extension inside PHP-Alpine-based Docker container
NPROC=$(getconf _NPROCESSORS_ONLN)
mkdir -p /usr/src/php/ext
cd /usr/src/php/ext
pecl bundle redis
docker-php-ext-configure redis --enable-redis-igbinary --enable-redis-lzf
docker-php-ext-install -j${NPROC} redis
cd -
@LoganTann
LoganTann / buildSVP.sh
Last active May 6, 2024 14:14
Build SVP for ubuntu 20.04
## source : https://www.youtube.com/watch?v=ABrO2kdXCWE
## but I fixed some bugs
## this installs dependancies used to get the dependancies and some sources + build tools
sudo apt-get update
sudo apt-get install g++
sudo apt-get update -y
sudo apt-get install -y beignet-opencl-icd
sudo apt-get install mediainfo
sudo apt-get install libqt5concurrent5 libqt5svg5 libqt5qml5
@oelbaga
oelbaga / 01 - Setup Nextjs site on Ubuntu Server - Terminal commands
Last active May 6, 2024 14:06
Setup NextJS app on Digital Ocean Ubuntu server Full Terminal Commands Step by Step
#Setup NextJS on Ubuntu server (Digital Ocean, EC2,...) Terminal Commands
#based on my YouTube video
#Recommended: An ubuntu server with at least 2 GB memory to handle npm run build
#login to server
ssh root@ip_address
#Upgrade Server - may take a few minutes
sudo apt update
sudo apt upgrade
@aws-scripting-guy
aws-scripting-guy / azure-devops-predefined-variables-in-the-scripts.md
Last active May 6, 2024 14:05
Azure DevOps tips: Using predefined variables in the scripts

Azure DevOps Pipelines: How to access predefined variables from scripts

In this scenario we want to access predefined variable $Build.Reason from the PowerShell script. $Build.Reason will have different value based on what triggered the build.

Configure azure-pipelines.yml

Map $Build.Reason to env variable for the powershell script.

- powershell: |
 .\scripts\git-package.ps1
@yigiteren
yigiteren / MeshCombiner.cs
Created October 21, 2021 09:54
A mesh combining example for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshCombiner : MonoBehaviour
{
[SerializeField] private List<MeshFilter> sourceMeshFilters;
[SerializeField] private MeshFilter targetMeshFilter;
[ContextMenu("Combine Meshes")]