Skip to content

Instantly share code, notes, and snippets.

View woodRock's full-sized avatar
🫖
Activate zen mode (CTRL + K, Z)

Jesse Wood woodRock

🫖
Activate zen mode (CTRL + K, Z)
View GitHub Profile
@woodRock
woodRock / fib.sql
Last active June 3, 2023 09:19
Postgres function to give Fibonacci Sequence in SQL.
create or replace function fib(n int)
returns setof int as $$
declare
a int := 0;
b int := 1;
begin
return next 0;
return next 1;
while a < n loop
a := a + b;
@woodRock
woodRock / primes.sql
Last active June 3, 2023 09:26
Postgres function to give first n prime numbers in SQL.
create or replace function primes(n int)
returns setof int as $$
declare
i integer := 2;
p integer := 0;
j integer := 0;
begin
while i <= n loop
j := floor(sqrt(i));
p := 1;
@woodRock
woodRock / primes.sql
Last active May 10, 2024 14:41
Write a query to print all prime numbers less than or equal to 1000. Print your result on a single line, and use the ampersand (&) character as your separator (instead of a space). Note: solved in SQL Sever MS.
DECLARE @I INT=2
DECLARE @PRIME INT=0
DECLARE @OUTPUT TABLE (NUM INT)
DECLARE @OUTPUT_STRING VARCHAR(MAX) = ''
WHILE @I<=1000
BEGIN
DECLARE @J INT = FLOOR(SQRT(@I))
SET @PRIME=1
@woodRock
woodRock / install_jdk_20_ubuntu.md
Created May 27, 2023 06:13
Install JDK 20 in Ubuntu:
@woodRock
woodRock / volume_boost.md
Created March 2, 2023 00:03
Boost volume on a Linux based distro.

Linux Volume Boost

I could not raise my volume for headphones to a reasonable level, everything was to quiet, and the volume rocker was already at max.

The command below opens an audio control panel, where you can raise the volume above the default 100%.

Run this command:

$ pavucontrol
@woodRock
woodRock / taglines.txt
Created December 2, 2022 07:41
Open AI Davinci software startup taglines...
Write x5 taglines for a software startup called Stardust Software with a space-themed pun:
1. "A Stellar Solution for your Software Needs!"
2. "Take Off with Stardust Software!"
3. "Reach for the Stars with Stardust Software!"
4. "Your Path to the Next Frontier with Stardust Software!"
5. "The Universe Awaits with Stardust Software!"
@woodRock
woodRock / settings.txt
Created November 16, 2022 09:41
Artemis I Lift Off - Deforum Stable Diffusion v0.5 - settings and prompts
{
"W": 512,
"H": 512,
"seed": 3838620589,
"sampler": "klms",
"steps": 50,
"scale": 7,
"ddim_eta": 0,
"dynamic_threshold": null,
"static_threshold": null,
@woodRock
woodRock / settings.txt
Created November 16, 2022 08:54
Stable Diffusion - Deforum Stable Diffusion v0.5 - prompt and settings.
{
"W": 512,
"H": 512,
"seed": 1488650924,
"sampler": "klms",
"steps": 50,
"scale": 7,
"ddim_eta": 0,
"dynamic_threshold": null,
"static_threshold": null,
@woodRock
woodRock / settings.txt
Created September 4, 2022 04:24
Father Day AI Generated Video with Deforum's Stable Diffusion Notebook.
{
"W": 512,
"H": 512,
"seed": 2211495417,
"sampler": "klms",
"steps": 50,
"scale": 7,
"ddim_eta": 0,
"dynamic_threshold": null,
"static_threshold": null,
@woodRock
woodRock / settings.txt
Created August 30, 2022 04:38
Joji - Glimpse of Us | AI Generated Music Video (Stable Diffusion + Deforum)
{
"batch_name": "Glimpse",
"outdir": "/content/drive/MyDrive/AI/StableDiffusion/2022-08/Glimpse/",
"save_grid": false,
"save_settings": true,
"save_samples": true,
"display_samples": true,
"n_samples": 100,
"W": 512,
"H": 512,