sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
/// If an error occurs while getting the amount of memory used, the first returned value in the tuple will be 0. | |
func getMemoryUsedAndDeviceTotalInMegabytes() -> (Float, Float) { | |
// https://stackoverflow.com/questions/5887248/ios-app-maximum-memory-budget/19692719#19692719 | |
// https://stackoverflow.com/questions/27556807/swift-pointer-problems-with-mach-task-basic-info/27559770#27559770 | |
var used_megabytes: Float = 0 | |
let total_bytes = Float(ProcessInfo.processInfo.physicalMemory) |
print(""" | |
Código nosso que estás em C | |
Santificado seja vós, Console | |
Venha a nós o vosso array[10] | |
E seja feita, sim, {vossa chave} | |
Assim no if{} como no else{} | |
O for (nosso; de cada dia; nos dai hoje++) | |
Debugai as nossas sentenças | |
Assim como nós colocamos o ponto e vígula esquecido; | |
E não nos deixeis errar identação |
Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:
Up Arrow
: Will show your last commandDown Arrow
: Will show your next commandTab
: Will auto-complete your commandCtrl + L
: Will clear the screenHTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
'use strict'; | |
var node = require('@remix-run/node'); | |
node.installGlobals(); |
# "Проверка" | ConvertTo-Encoding windows-1251 koi8-r | |
# Get-Content notes.txt | ConvertTo-Encoding "windows-1251" "koi8-r" | Set-Content decoded.txt | |
function ConvertTo-Encoding ([string]$From, [string]$To){ | |
Begin{ | |
$encFrom = [System.Text.Encoding]::GetEncoding($from) | |
$encTo = [System.Text.Encoding]::GetEncoding($to) | |
} | |
Process{ | |
$bytes = $encTo.GetBytes($_) | |
$bytes = [System.Text.Encoding]::Convert($encFrom, $encTo, $bytes) |
import { NextResponse } from "next/server"; | |
import { getLowestPrice, getHighestPrice, getAveragePrice, getEmailNotifType } from "@/lib/utils"; | |
import { connectToDB } from "@/lib/mongoose"; | |
import Product from "@/lib/models/product.model"; | |
import { scrapeAmazonProduct } from "@/lib/scraper"; | |
import { generateEmailBody, sendEmail } from "@/lib/nodemailer"; | |
export const maxDuration = 300; // This function can run for a maximum of 300 seconds | |
export const dynamic = "force-dynamic"; |
alias fan-auto='systemctl start supermicro-fan-auto.timer' | |
alias fan-full='systemctl stop supermicro-fan-auto.timer && sleep 5 && sm fan full' | |
alias fan-pue2='systemctl stop supermicro-fan-auto.timer && sleep 5 && sm fan pue2' | |
alias fan-optimal='systemctl stop supermicro-fan-auto.timer && sleep 5 && sm fan optimal' | |
alias fan-heavyio='systemctl stop supermicro-fan-auto.timer && sleep 5 && sm fan heavyio' | |
alias fan-standard='systemctl stop supermicro-fan-auto.timer && sleep 5 && sm fan standard' |