Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / ollama_portable.bat
Created December 24, 2024 08:01
Ollama Portable Windows
@echo off
title Ollama Portable
set OLLAMA_ORIGINS=*
set OLLAMA_HOST=0.0.0.0
set userprofile=%cd%\data
set localappdata=%cd%\data\AppData\Local
cmd /k ollama.exe
@CypherpunkSamurai
CypherpunkSamurai / remove all docker images.txt
Last active December 21, 2024 23:13
Docker Remove All Images
docker rm -f $(docker ps -qa); docker volume rm $(docker volume ls -q); docker rmi -f $(docker images -q)
@CypherpunkSamurai
CypherpunkSamurai / install_tailwind_vite.sh
Created December 19, 2024 19:43
Install Tailwind in ViteJS
pnpm install -D tailwindcss postcss autoprefixer
pnpx tailwindcss init -p
cat > tailwind.config.js <<EOF
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
@CypherpunkSamurai
CypherpunkSamurai / launch.json
Created December 18, 2024 17:26
VSCode Vite launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node-terminal",
"name": "Run Script: dev",
"request": "launch",
"command": "npm run dev",
"cwd": "${workspaceFolder}",
"internalConsole": "integratedTerminal",
@CypherpunkSamurai
CypherpunkSamurai / wallpaper.sh
Last active December 22, 2024 18:58 — forked from BuonOmo/wallpaper.sh
Unsplash Random Change wallpaper randomly using unsplash.it API.
#!/bin/sh
#
# Change definition of the screen on line 6.
file=$(mktemp /tmp/wallpaper.XXX.jpg)
curl --output $file 'https://unsplash.it/1920/1080/?random'
gsettings set org.gnome.desktop.background picture-uri file://$file
@CypherpunkSamurai
CypherpunkSamurai / JavaScript - Determine if Hex Color is Light or Dark.js
Created December 16, 2024 14:46 — forked from krabs-github/JavaScript - Determine if Hex Color is Light or Dark.js
[JavaScript - Determine if Hex Color is Light or Dark] JavaScript - Determine if Hex Color is Light or Dark #JavaScript
function lightOrDark(color) {
// Check the format of the color, HEX or RGB?
if (color.match(/^rgb/)) {
// If HEX --> store the red, green, blue values in separate variables
color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);
r = color[1];
g = color[2];
@CypherpunkSamurai
CypherpunkSamurai / chrome builds.txt
Created December 15, 2024 17:03
Chrome Browser Builds
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/1181217/
@CypherpunkSamurai
CypherpunkSamurai / msys2_refresh.ps1
Last active December 11, 2024 18:44
Msys2 Fresh Portable Install
# Refresh Msys2 Installation
# Paths
$msys2_extract_dir = "$PWD\msys2"
# Variables
$msys2_repository = "msys2/msys2-installer"
$release_api = "https://api.github.com/repos/$msys2_repository/releases/latest"
$msys2_nightly_file = "msys2-nightly.sfx.exe"
@CypherpunkSamurai
CypherpunkSamurai / cloudflare-tunnels.md
Created December 10, 2024 20:35
Cloudflare Tunnels

Cloudflared

  1. login
cloudflared tunnel login
  1. create a tunnel
cloudflared tunnel create [name]
@CypherpunkSamurai
CypherpunkSamurai / install-miniconda-wsl.sh
Last active December 8, 2024 10:45
Install Miniconda WSL
# https://docs.anaconda.com/free/miniconda/index.html#quick-command-line-install
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
# Init Miniconda
~/miniconda3/bin/conda init bash
# Resource Bash