Skip to content

Instantly share code, notes, and snippets.

View System3-2's full-sized avatar
💀
chilling

System32 System3-2

💀
chilling
View GitHub Profile
import javax.sound.sampled.*;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args)throws UnsupportedAudioFileException, IOException, LineUnavailableException {
Scanner scanner = new Scanner(System.in);
File file = new File("C:\\Users\\Oloja\\Downloads\\flex.wav");
@System3-2
System3-2 / scrollbar-customization.css
Created November 23, 2023 16:07
Chrome webkit customization
/*Chrome webkit scrollbar customization*/
::-webkit-scrollbar {
height: 12px;
width: 12px;
background: #000;
}
::-webkit-scrollbar-thumb {
background: #393812;
alias nvim-lazy="NVIM_APPNAME=LazyVim nvim"
alias nvim-chad="NVIM_APPNAME=NvChad nvim"
alias nvim-astro="NVIM_APPNAME=AstroNvim nvim"
function nvims() {
items=("default" "LazyVim" "NvChad" "AstroNvim")
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config  " --height=~50% --layout=reverse --border --exit-0)
if [[ -z $config ]]; then
echo "Nothing selected"
return 0
@System3-2
System3-2 / index.strategy.ts
Created May 18, 2023 09:14
Get authenticated user strategy
import { ExecutionContext } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
@Injectable()
export class CustomAuthGuard extends AuthGuard('strategyName') {
canActivate(context: ExecutionContext): boolean {
const request = context.switchToHttp().getRequest();
// Access the authentication strategy name or identifier
const strategy = super.getActiveStrategy(request);
@System3-2
System3-2 / main.strategy.ts
Created May 16, 2023 19:57
Nestjs authentication strategy public
npm install --save @nestjs/passport passport-jwt passport-google-oauth20 passport-github2
import { Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { AuthService } from '../auth.service';
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
@System3-2
System3-2 / docker-compose.yml
Created May 2, 2023 22:53
docker compose bug report
version: '3.8'
services:
db:
image: postgres:13
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Wardprowse26
POSTGRES_DB: nest