MongoDB Crash Course 2022 < TODO: Add Video Link
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This loads of all of files that you call below from your 'static' folder --> | |
{% load staticfiles %} | |
<!--The static folder consists of your bootstrap files (.css, .js, fonts, etc)--> | |
<!--When you load the static folders is calls all those folders in the static files without having to code each one in individually--> | |
<html> | |
<head> | |
<!--This is the meta information which is good for SEO--> | |
{% block head-meta %} | |
<meta charset="utf-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding(DefaultParameterSetName = "PreDown")] | |
param ( | |
[Parameter(ParameterSetName = "Setup")] | |
[switch] | |
$Setup, | |
[Parameter(ParameterSetName = "Setup")] | |
[switch] | |
$RestartWGService, | |
# WireGuard Interface | |
[Parameter(Position = 0)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Tetris Move | |
Have the function TetrisMove(strArr) take strArr parameter being passed | |
which will be an array containing one letter followed by 12 numbers | |
representing a Tetris piece followed by the fill levels for the 12 columns | |
of the board. | |
Calculate the greatest number of horizontal lines that can be completed | |
when the piece arrives at the bottom assuming it is dropped immediately | |
after being rotated and moved horizontally from the top. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client" | |
import { forwardRef, useState } from "react" | |
import { EyeIcon, EyeOffIcon } from "lucide-react" | |
import { Button } from "@/components/ui/button" | |
import { Input, InputProps } from "@/components/ui/input" | |
import { cn } from "@/lib/utils" | |
const PasswordInput = forwardRef<HTMLInputElement, InputProps>( | |
({ className, ...props }, ref) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func scrollViewDidScroll(_ scrollView: UIScrollView) { | |
for (i, view) in scrollView.subviews.enumerated() { | |
var ty = 0.0 | |
if scrollView.contentOffset.y < 0 { | |
// We're scrolling past the top of the scroll view. | |
// Translate each item in the scroll view by some amount based on its index and scroll offset. | |
ty = CGFloat(i) * abs(offsetY) / 8.0 * pow(1.12, CGFloat(i)) | |
} | |
view.transform = CGAffineTransform(translationX: 0, y: ty) | |
} |
NewerOlder