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
[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) | |
} |
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
// Image+Trim.swift | |
// | |
// Copyright © 2020 Christopher Zielinski. | |
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
deb http://http.kali.org/kali kali-rolling main contrib non-free | |
deb-src http://http.kali.org/kali kali-rolling main contrib non-free | |
#deb http://kali.cs.nctu.edu.tw/kali kali-rolling main non-free contrib |
NewerOlder