Compare commits
26
Commits
cc63840fcb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa73c356f5 | ||
|
|
6d97a84bf9 | ||
|
|
b1539e8985 | ||
|
|
4796c9633e | ||
|
|
99724786ca | ||
|
|
343d1277d6 | ||
|
|
3379b3c58b | ||
|
|
e0d1cf30b1 | ||
|
|
da79240044 | ||
|
|
75a5e73356 | ||
|
|
4f15356578 | ||
|
|
0d443f89d4 | ||
|
|
0b7ebab8c3 | ||
|
|
eb9ba299aa | ||
|
|
5cacdec789 | ||
|
|
670707a857 | ||
|
|
1f89c56c2c | ||
|
|
cb779f4134 | ||
|
|
a7e00cbac7 | ||
|
|
203365a9fb | ||
|
|
c98db4a373 | ||
|
|
800beefb11 | ||
|
|
893eff8eec | ||
|
|
5bae9bc66e | ||
|
|
0e1ecfedaa | ||
|
|
e483adfba0 |
No files matched your search
+1
-1
@@ -287,7 +287,7 @@ alias rsync-vfat='rsync -rtv --stats --modify-window=2'
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
export LESS='Ri'
|
export LESS='Ri'
|
||||||
export EDITOR=vim
|
export EDITOR=nvim
|
||||||
export LC_COLLATE=C
|
export LC_COLLATE=C
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
alias claude='claude --name "Claude: $(basename $PWD)"'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alias ctags='ctags --c-kinds=+p --c++-kinds=+p'
|
||||||
+6
-1
@@ -25,9 +25,14 @@ function git-config-joshs()
|
|||||||
git config --global mergetool.bc.cmd \
|
git config --global mergetool.bc.cmd \
|
||||||
'git_bcmerge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"'
|
'git_bcmerge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"'
|
||||||
git config --global alias.authors '!git log --pretty="%an" | sort | uniq -c | sort -n'
|
git config --global alias.authors '!git log --pretty="%an" | sort | uniq -c | sort -n'
|
||||||
git config --global init.defaultBranch master
|
git config --global init.defaultBranch main
|
||||||
# Only use configured user.name/user.email; do not guess them
|
# Only use configured user.name/user.email; do not guess them
|
||||||
git config --global user.useConfigOnly true
|
git config --global user.useConfigOnly true
|
||||||
|
# Do not automatically mark my branch as tracking the remote branch that I
|
||||||
|
# happened to use as the starting point.
|
||||||
|
git config --global branch.autoSetupMerge false
|
||||||
|
# delete all branches that have been merged to HEAD
|
||||||
|
git config --global alias.prunebranches '!git branch --merged | grep -v '^\*' | xargs git branch -d'
|
||||||
}
|
}
|
||||||
function git-config-local-personal()
|
function git-config-local-personal()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
alias grepgit='git ls-files -z | xargs -0 grep --color=auto -H'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
source $HOME/.profile
|
||||||
|
source $HOME/.bashrc
|
||||||
+1
-1
@@ -6,7 +6,7 @@ import getopt
|
|||||||
from subprocess import *
|
from subprocess import *
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
bitrate = 128
|
bitrate = 256
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(argv[1:], "b:")
|
opts, args = getopt.getopt(argv[1:], "b:")
|
||||||
except getopt.GetoptError:
|
except getopt.GetoptError:
|
||||||
|
|||||||
@@ -1,39 +1,56 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
# Use HighContrast GTK2 theme for gvim.
|
require "open3"
|
||||||
ENV["GTK2_RC_FILES"] = "/usr/share/themes/HighContrast/gtk-2.0/gtkrc"
|
|
||||||
|
|
||||||
def get_server_name(path)
|
SEARCH = %w[.git project.vim]
|
||||||
if path
|
EDITOR = "nvim-qt"
|
||||||
path = File.expand_path(path)
|
|
||||||
while path != "/"
|
def find_proj_root(path)
|
||||||
dirname = File.dirname(path)
|
path = File.expand_path(path)
|
||||||
if File.exists?(File.join(dirname, "project.vim"))
|
loop do
|
||||||
if dirname =~ %r{([^/]+)/([^/]+)/*$}
|
dirname = File.dirname(path)
|
||||||
sn = "#{$2}(#{$1})"
|
if SEARCH.any? {|s| File.exist?(File.join(dirname, s))}
|
||||||
else
|
if dirname =~ %r{([^/]+)/([^/]+)/*$}
|
||||||
sn = File.basename(dirname)
|
pretty_name = "#{$2}(#{$1})"
|
||||||
end
|
else
|
||||||
return sn
|
pretty_name = File.basename(dirname)
|
||||||
end
|
end
|
||||||
path = dirname
|
stdout, stderr, status = Open3.capture3("xxh32sum", stdin_data: dirname)
|
||||||
|
socket_name = stdout.sub(/\s.*/m, "")
|
||||||
|
return [socket_name, pretty_name]
|
||||||
|
end
|
||||||
|
path = dirname
|
||||||
|
if path == "/"
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return "GVIM"
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def server_running?(server_name)
|
def run_dir
|
||||||
`gvim --serverlist`.lines.map(&:chomp).include?(server_name.upcase)
|
ENV["XDG_RUNTIME_DIR"] || "/tmp"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.empty?
|
if ARGV.empty?
|
||||||
server_name = get_server_name('local_file')
|
exec(EDITOR)
|
||||||
exec("/usr/bin/gvim", "--servername", server_name, err: "/dev/null")
|
|
||||||
else
|
else
|
||||||
ARGV.each_with_index do |path, i|
|
socket_name, pretty_name = find_proj_root(ARGV[0])
|
||||||
server_name = get_server_name(path)
|
if socket_name
|
||||||
sleep(0.2) if i > 0
|
socket_path = "#{run_dir}/e-#{socket_name}.sock"
|
||||||
system("/usr/bin/gvim", "--servername", server_name, "--remote-tab-silent", path, err: "/dev/null")
|
if File.exist?(socket_path)
|
||||||
|
opencmds = ARGV.map do |path|
|
||||||
|
path = File.expand_path(path).gsub(" ", "\\ ")
|
||||||
|
%[:tab drop #{path}<CR>]
|
||||||
|
end.join
|
||||||
|
exec("nvim", "--headless", "--server", socket_path, "--remote-send", "<Esc>#{opencmds}:call GuiForeground()<CR><C-l>")
|
||||||
|
else
|
||||||
|
paths = ARGV.map do |path|
|
||||||
|
File.expand_path(path)
|
||||||
|
end
|
||||||
|
exec(EDITOR, "--", "--listen", socket_path, "--cmd", "let g:project_name = '#{pretty_name}'", "-p", *paths)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exec(EDITOR, "--", "-p", *ARGV)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -10,3 +10,4 @@ tags
|
|||||||
/.ruby-version
|
/.ruby-version
|
||||||
/.ruby-gemset
|
/.ruby-gemset
|
||||||
/_local/
|
/_local/
|
||||||
|
.claude/
|
||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec gpu-screen-recorder -w screen -o ~/Videos -r 90 -c mp4 -a default_output -a default_input -ac aac
|
||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec killall -SIGUSR1 gpu-screen-recorder
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#DEFAULT_SINK=$(pactl get-default-sink)
|
||||||
|
#MONITOR_SINK="${DEFAULT_SINK}.monitor"
|
||||||
|
|
||||||
|
#gpu-screen-recorder -w screen -o ~/Videos -r 90 -c mp4 -a "$MONITOR_SINK" -a default_input -ac aac >> $HOME/.gpu-screen-recorder.log &
|
||||||
|
gpu-screen-recorder -w screen -o ~/Videos -r 90 -c mp4 -a default_output -a default_input -ac aac >> $HOME/.gpu-screen-recorder.log &
|
||||||
|
PID=$!
|
||||||
|
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
kill -SIGINT $PID
|
||||||
|
wait $PID
|
||||||
Executable
+62
@@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
# Install: kid3-common
|
||||||
|
|
||||||
|
require "fileutils"
|
||||||
|
|
||||||
|
$stdout.sync = true
|
||||||
|
files = Dir.glob("*.mp3").sort
|
||||||
|
|
||||||
|
if files.empty?
|
||||||
|
$stderr.puts "No .mp3 files found"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
unless File.exist?("albumart.jpg")
|
||||||
|
$stderr.puts "albumart.jpg not found"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
unless File.exist?("info.txt")
|
||||||
|
$stderr.puts "info.txt not found"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
info = File.read("info.txt")
|
||||||
|
info =~ /^artist: (.*)$/
|
||||||
|
artist = $1
|
||||||
|
info =~ /^album: (.*)$/
|
||||||
|
album = $1
|
||||||
|
info =~ /^year: (.*)$/
|
||||||
|
date = $1
|
||||||
|
|
||||||
|
unless artist && album && date
|
||||||
|
$stderr.puts "invalid info.txt format"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
#$stdout.write("Release date (YYYY-MM-DD): ")
|
||||||
|
#date = gets.chomp
|
||||||
|
#unless date =~ /^\d{4}-\d{2}-\d{2}$/
|
||||||
|
# $stderr.puts "Unexpected date format"
|
||||||
|
# exit 1
|
||||||
|
#end
|
||||||
|
|
||||||
|
files.each do |file|
|
||||||
|
if file =~ /^(\d+)\s*(.*)\.mp3$/
|
||||||
|
track_number, title = $1.to_i, $2
|
||||||
|
command = %w[kid3-cli]
|
||||||
|
command += ["-c", "revert", "-c", "save"]
|
||||||
|
command += ["-c", %[set artist "#{artist}" 12]]
|
||||||
|
command += ["-c", %[set title "#{title}" 12]]
|
||||||
|
command += ["-c", %[set album "#{album}" 12]]
|
||||||
|
command += ["-c", %[set date "#{date}" 12]]
|
||||||
|
command += ["-c", %[set track "#{track_number}" 12]]
|
||||||
|
command += ["-c", %[set picture:albumart.jpg 'Front Cover' 2]]
|
||||||
|
command += ["-c", "save"]
|
||||||
|
command << file
|
||||||
|
system(*command)
|
||||||
|
else
|
||||||
|
$stderr.puts "Warning: skipping #{file}, unrecognized name format"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -21,12 +21,16 @@ def install_file(src, dst):
|
|||||||
|
|
||||||
files = [
|
files = [
|
||||||
('bash_aliases', '.bash_aliases'),
|
('bash_aliases', '.bash_aliases'),
|
||||||
|
('bash_aliases.d', '.bash_aliases.d'),
|
||||||
|
('bash_profile', '.bash_profile'),
|
||||||
|
('profile', '.profile'),
|
||||||
('inputrc', '.inputrc'),
|
('inputrc', '.inputrc'),
|
||||||
('screenrc', '.screenrc'),
|
('screenrc', '.screenrc'),
|
||||||
('gitignore', '.gitignore'),
|
('gitignore', '.gitignore'),
|
||||||
('colordiffrc', '.colordiffrc'),
|
('colordiffrc', '.colordiffrc'),
|
||||||
('rvmrc', '.rvmrc'),
|
('rvmrc', '.rvmrc'),
|
||||||
('toprc', '.toprc'),
|
('toprc', '.toprc'),
|
||||||
|
('ctags', '.ctags'),
|
||||||
]
|
]
|
||||||
|
|
||||||
for s, d in files:
|
for s, d in files:
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ All That Remains
|
|||||||
Collective Soul
|
Collective Soul
|
||||||
Dave Matthews Band
|
Dave Matthews Band
|
||||||
Days Of The New
|
Days Of The New
|
||||||
#DevilDriver
|
DevilDriver
|
||||||
|
deadmau5
|
||||||
#Falling in Reverse
|
#Falling in Reverse
|
||||||
Eluveitie
|
Eluveitie
|
||||||
Fear Factory
|
Fear Factory
|
||||||
@@ -19,7 +20,9 @@ Fuel
|
|||||||
#Godsmack
|
#Godsmack
|
||||||
Hans Zimmer
|
Hans Zimmer
|
||||||
Incubus
|
Incubus
|
||||||
|
LFO
|
||||||
Lamb of God
|
Lamb of God
|
||||||
|
Linkin Park
|
||||||
London Symphony Orchestra
|
London Symphony Orchestra
|
||||||
#Machine Head
|
#Machine Head
|
||||||
Matchbox Twenty
|
Matchbox Twenty
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||||
|
export PATH="$HOME/bin":"$PATH"
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
if ARGV.empty?
|
||||||
|
files = Dir["*.wav"].sort
|
||||||
|
else
|
||||||
|
files = ARGV
|
||||||
|
end
|
||||||
|
|
||||||
|
files.each do |infile|
|
||||||
|
outfile = infile.sub(".wav", ".mp3")
|
||||||
|
|
||||||
|
puts "Converting: #{infile} -> #{outfile}"
|
||||||
|
|
||||||
|
command = %W[lame -v -b 256 #{infile} #{outfile}]
|
||||||
|
system(*command)
|
||||||
|
end
|
||||||
|
|
||||||
|
puts "Conversion complete!"
|
||||||
Reference in new issue
Block a user