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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="white">#FFFFFF</color> | |
<color name="ivory">#FFFFF0</color> | |
<color name="light_yellow">#FFFFE0</color> | |
<color name="yellow">#FFFF00</color> | |
<color name="snow">#FFFAFA</color> | |
<color name="floral_white">#FFFAF0</color> | |
<color name="lemon_chiffon">#FFFACD</color> | |
<color name="cornsilk">#FFF8DC</color> |
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
def it(n) | |
x = [*2..n] | |
x.each do |i| | |
[*(i+1)..n].each { |j| x.delete(j) if (j%i).zero? } | |
end | |
end | |
# 1) what does it do? | |
# 2) how fast is it? | |
# 3) can you make it faster? |
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 | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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 | |
# Function to find and kill gnome and xorg processes using the NVIDIA GPU | |
kill_gpu_processes() { | |
# Find Gnome and Xorg processes using the NVIDIA GPU | |
local gpu_processes=$(nvidia-smi | grep 'gnome\|xorg' | awk '{ print $5 }') | |
# Kill the processes gracefully | |
for pid in $gpu_processes; do | |
echo "Killing process with PID $pid" | |
kill $pid |
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
# prompt: "write a snake game for me in python" | |
import random | |
import pygame | |
pygame.init() | |
white = (255, 255, 255) | |
black = (0, 0, 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
# put this in chrome-untrusted://terminal/html/nassh_preferences_editor.html | |
# all JB Nerd Fonts can be see here: https://www.jetbrains.com/lp/mono/#font-family | |
@font-face { | |
font-family: "JetBrains Mono Nerd Font Extra Light"; | |
src: url("https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/JetBrainsMono/Ligatures/ExtraLight/JetBrainsMonoNerdFont-ExtraLight.ttf"); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
### Step-by-Step Guide | |
1. **Check for Active Connections:** | |
- Use `nmcli` to list active connections and identify the correct connection name: | |
```bash | |
nmcli connection show | |
``` | |
2. **Edit the Connection Profile via nmcli:** |