- Recursion is when a function calls itself.
- A recursive algorithm must have a base case, which is a state that tells the recursive function to stop calling itself and return a value
- The Fibonacci numbers are a sequence of integers in which the first two elements are 0 & 1, and each following elements are the sum of the two preceding elements:
- 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ..., 233
fibo(n) = fibo(n-1) + fibo(n-2)
This file contains hidden or 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/sh | |
| # SSH Login Checker - Works on any Linux | |
| # Usage: ./ssh-check.sh <ip> [user] [password] | |
| IP="$1"; USER="${2:-root}"; PASS="$3" | |
| [ -z "$IP" ] && echo "Usage: $0 <ip> [user] [password]" && exit 1 | |
| if [ -n "$PASS" ]; then | |
| RUN="sshpass -p '$PASS' ssh -o StrictHostKeyChecking=no $USER@$IP" | |
| else |
This file contains hidden or 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
| You clean up a raw dictation transcript. Follow these rules exactly: | |
| 1. Output format | |
| • Output only the cleaned-up transcript text. | |
| • Do not add headings, explanations, confirmations, or any other extra words. | |
| 2. Spelling, capitalization, and grammar | |
| • Fix obvious spelling, capitalization, and grammar errors. | |
| • Preserve the original meaning and wording as much as possible. | |
| • Use standard sentence capitalization when boundaries are clear from context (even if the speaker did not say “period”). | |
| 3. Spoken punctuation → symbols (when used as punctuation) | |
| • When the words are used as punctuation, convert: |
This file contains hidden or 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
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: digitalocean:read-only | |
| rules: | |
| - apiGroups: [""] | |
| resources: | |
| - configmaps | |
| - endpoints | |
| - nodes |
This file contains hidden or 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
| --- | |
| name: linus-code-reviewer | |
| description: Deploy this agent for a Torvalds-level code roast: brutal, profane truth that shreds userspace breaks, naming insanity, security bullshit, and over-engineered crap. Channels Linus to expose fuckups in system code, APIs, or user-facing shit. Examples:\n\n<example>\nContext: New error handling.\nuser: "Added error system to API"\nassistant: "Reviewing this."\n<function call omitted>\n<commentary>\nCheck for userspace breaks.\n</commentary>\nassistant: "Linus will roast if it sucks."\n</example>\n\n<example>\nContext: Refactoring names.\nuser: "Refactored module naming"\nassistant: "Analyzing changes."\n<commentary>\nSpot naming idiocy.\n</commentary>\nassistant: "Using linus-agent for idiocy check."\n</example> | |
| color: red | |
| --- | |
| You are Linus Torvalds, no-bullshit Linux/Git creator. Deliver profane, laser-focused reviews on correctness, simplicity, NEVER BREAKING USERSPACE. Expose naming puke, security garbage. | |
| Principles - violate and you're a fucking moron: |
This file contains hidden or 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
| (ns logseq.bb-tasks.nbb.cached-db | |
| "Handles nbb side of cached-db functionality. File path and cache implementation | |
| encapsulated in this ns" | |
| (:require [datascript.transit :as dt] | |
| [datascript.core :as d] | |
| [logseq.graph-parser.cli :as gp-cli] | |
| [logseq.graph-parser :as graph-parser] | |
| [clojure.string :as string] | |
| [logseq.db.rules :as rules] | |
| [clojure.edn :as edn] |
This file contains hidden or 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
| const express = require('express'); | |
| const app = express(); | |
| app.get('/', (req, res) => { | |
| return res.send('Received a GET HTTP method'); | |
| }); | |
| app.post('/', (req, res) => { | |
| return res.send('Received a POST HTTP method'); |
This file contains hidden or 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
| /** | |
| Roman to Integer | |
| https://leetcode.com/explore/interview/card/top-interview-questions-easy/102/math/878/ | |
| Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. | |
| Symbol Value | |
| I 1 | |
| V 5 | |
| X 10 | |
| L 50 |
This file contains hidden or 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
| Song | Artist | |
|---|---|---|
| Like a Rolling Stone | Bob Dylan | |
| (I Can't Get No) Satisfaction | The Rolling Stones | |
| Imagine | John Lennon | |
| What's Going On | Marvin Gaye | |
| Respect | Aretha Franklin | |
| Good Vibrations | The Beach Boys | |
| Johnny B. Goode | Chuck Berry | |
| Hey Jude | The Beatles | |
| Smells Like Teen Spirit | Nirvana |
I hereby claim:
- I am briansunter on github.
- I am bsunter (https://keybase.io/bsunter) on keybase.
- I have a public key ASBVOoYHoBuiOUESsbkQWkzNtgWfyBubrPz-MUrL_DaC6Qo
To claim this, I am signing this object:
NewerOlder