Skip to content

Instantly share code, notes, and snippets.

View anvanvan's full-sized avatar

An Van anvanvan

View GitHub Profile
@TristanBrotherton
TristanBrotherton / README.md
Last active October 17, 2025 12:05
Claude Code macOS Notifications Setup - Automated installation guide for system notifications with sound

Claude Code macOS Notifications Setup

This document provides instructions for Claude Code to automatically set up macOS system notifications for when Claude is waiting for user input or has completed tasks.

What This Sets Up

  • System notifications when Claude needs permission for tools
  • System notifications when Claude has been idle waiting for input
  • Sound alerts (Glass sound) with each notification
  • Notification logging for debugging
@qertoip
qertoip / sliding_session_timeout.ex
Last active July 18, 2023 15:33
Elixir / Phoenix Sliding Session Timeout Plug
# How to use it:
#
# Plug it at the end of your :browser pipeline in your Phoenix app router.ex
# Make sure it is plugged before your session-based authentication and authorization Plugs.
#
# pipeline :browser do
# plug :accepts, ["html"]
# plug :fetch_session
# plug :fetch_flash
# plug :put_secure_browser_headers
@joakimk
joakimk / File.md
Created September 11, 2016 13:18
heroku: Could not connect to database to initialize transfer

If you're seeing this error, try heroku ps:scale web=0 then import the database again and run heroku ps:scale web=1 afterwards. Found nothing on google for this error, so posting this gist with the solution that worked for me. Could have been a temporary error too.

@revolunet
revolunet / ffmpeg-tips.md
Last active April 16, 2025 04:29
ffmpeg tips

libcaca output from your OSX webcam

ffmpeg -f avfoundation -framerate 30 -s "640x480" -i "0" -c:v rawvideo -pix_fmt rgb24 -f caca -s "640x480" output4.mp4

brew install ffmpeg with options

brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-libcaca

convert to another format, resize withouth quality loss

ffmpeg -i vitrine.mp4 -vf scale=1024:-1 -q:vscale 0 vitrine.avi

@renekreijveld
renekreijveld / jnewfiles
Last active May 17, 2022 15:32
Bash script to detect new and changed php and html files last 3 hours. Skips cache directories.
#!/bin/sh
# jnewfiles
# Detects new and changed php and html files last xxx minutes
# (C) 2014 Rene Kreijveld, enail [at] renekreijveld [dot] nl
# Update 31-12-2013: only send email when changes are found
# Update 04-02-2014: check for new files last three hours
# Update 05-05-2014: check for new html files also
# Update 07-05-2014: filter out ju_chached and DirectAdmin stats folders in html files