Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / organize images using AI.md
Last active October 11, 2024 13:24
organize images using AI

Organize Images into folders using AI

This is a tool that sorts images into folders using "AI". You create the folders you want the images to be put into.

I got 'claude' to write with a couple prompts. Make venv and install deps with pip.

# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@nileshtrivedi
nileshtrivedi / home-server.md
Last active June 1, 2024 00:11
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615

I already have my own domain name: mydomain.com. I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.

@yohanesgultom
yohanesgultom / ! Python Scripts
Last active August 11, 2023 16:30
Random python scripts
Random collection of python scripts
@meeech
meeech / gist:b2dafdb31f90160e833c
Created June 29, 2015 15:47
pick from whitelist of random themes for oh-my-zsh
#Add to your .zshrc right by ZSH_THEME
#######
# Setup a random theme to load from a list I define
MYZSH_RANDOM_THEMES=(\
're5et' \
'sorin' \
'steeef' \
'dstufft' \
'random' \
@gabstv
gabstv / cvwebv.sh
Last active January 12, 2019 05:57
Convert videos to HTML5 friendly video formats (mp4, ogg and webm).
#!/bin/bash
# For this to work, you need to have ffmpeg
# installed with libvorbis, theora and libvpx ENABLED
# to do that in Homebrew:
# brew reinstall ffmpeg --with-libvpx --with-libvorbis --with-theora
#
# encoding reference:
# https://blog.mediacru.sh/2013/12/23/The-right-way-to-encode-HTML5-video.html
@Spudz76
Spudz76 / WebStorm-Cygwin-HOWTO.md
Last active February 18, 2024 13:23
Set up Windows Powershell to use cygwin where possible and optionally autolaunch bash when it starts up

#WebStorm Cygwin with "PowerBash" Begin with the guide by @nullivex here for general installation. NOTE: This is all with 32-bit stuff even on x64 platform. Cygwin32, and WebStorm and Node.js etc all set up 32-bit. You may skip the Git parts of that guide, and instead install Cygwin and the git and openssh it contains. Otherwise, you must NOT set up git in Cygwin so that the Native Git is found. But, that would sort of negate most of the gains herein. If you already use Cygwin and its git and have openssh keys all set up for Github and etc, this is a way to keep one set of configurations, and a familiar shell.

This will set up WebStorm to use Cygwin versions of everything except for:

  • Node.js (because there is no Cygwin version currently)
  • Python (because some of the Node.js/npm thin
@nullivex
nullivex / README.md
Last active February 8, 2022 19:57
Windows 7 64bit, NodeJS 32bit, MongoDB, Mongoose, Bcrypt, SocketIO, Canvas, Git

Windows NodeJS Stack

This took me several hours to figure out so I figured it was worth writing down.

Hopefully this step by step can be used to get node running locally without a lot of problems that are commonly ran into.

Downloads

Update July 7th 2014 - Updated most of the versions including not pointing to the heartbleed version of OpenSSL

@MisterPoppet
MisterPoppet / tidesdk-mac-reopen.js
Created January 26, 2013 01:27
This is the bare minimum javascript you need to ensure that a TideSDK-based app will not exit when you close the window on a Mac. It simply reopens the closed the window.
var preventCloseEvent = function() {
var appWindow = Ti.UI.getCurrentWindow();
appWindow.addEventListener(Ti.CLOSE, function(event) {
appWindow.hide();
event.preventDefault();
return false;
});
return appWindow;