Skip to content

Instantly share code, notes, and snippets.

@mjbalcueva
mjbalcueva / password-input.tsx
Last active April 24, 2024 12:17
shadcn ui custom password input
"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) => {
@ritwikraha
ritwikraha / Pretraining-LLM.md
Last active April 24, 2024 12:17
Pretraining of Large Language Models

Pretraining


A Map for Studying Pre-training in LLMs

  • Data Collection
    • General Text Data
    • Specialized Data
  • Data Preprocessing
    • Quality Filtering
  • Deduplication
@straker
straker / README.md
Last active April 24, 2024 12:16
Basic Pong HTML and JavaScript Game

Basic Pong HTML and JavaScript Game

This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
@n1chre
n1chre / emoji.txt
Created October 14, 2017 11:25
Unicode emojis
ʘ‿ʘ
Innocent face
ಠ_ಠ
Reddit disapproval face
(╯°□°)╯︵ ┻━┻
Table Flip / Flipping Table
┬─┬ ノ( ゜-゜ノ)
@invictus-ir
invictus-ir / CloudTrail.csv
Last active April 24, 2024 12:15
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9. in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 24, 2024 12:12
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@mahenzon
mahenzon / main.py
Created November 23, 2021 18:13
Python + gspread demo
import string
from pprint import pprint
import gspread
from gspread import Cell, Client, Spreadsheet, Worksheet
from gspread.utils import rowcol_to_a1
import requests
SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/.../"
@ubergesundheit
ubergesundheit / create-kubeconfig.sh
Created May 30, 2022 08:14
RBAC namespace permissions
# The script returns a kubeconfig for the service account given
# you need to have kubectl on PATH with the context set to the cluster you want to create the config for
# Cosmetics for the created config
clusterName=....
# your server address goes here get it via `kubectl cluster-info`
server=https://....
# the Namespace and ServiceAccount name that is used for the config
namespace=mynamespace
serviceAccount=mynamespace-user
@idowu-tobi-damilola
idowu-tobi-damilola / media-query.css
Last active April 24, 2024 12:09 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@kodie
kodie / array_map_assoc.php
Last active April 24, 2024 12:04
Array map function that allows you to change keys as well as values
<?php
// Array map function that allows you to change keys as well as values
// Example: array_map_assoc(function($k, $v) { return array($k => $v); }, $array);
function array_map_assoc(callable $f, array $a) {
return array_merge(...array_map($f, array_keys($a), $a));
}
?>