mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 16:10:14 +00:00
remove unused dotfiles
This commit is contained in:
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function export-emacs {
|
||||
if [ "$(emacsclient -e t)" != 't' ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
for name in "${@}"; do
|
||||
value=$(eval echo \"\$${name}\")
|
||||
emacsclient -e "(setenv \"${name}\" \"${value}\")" >/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
for i in $(python -c $"import os; [print(k) for k in os.environ.keys()]"); do
|
||||
export-emacs "$i"
|
||||
done
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
system %{osascript -e 'display notification "#{ARGV.join(' ')}"'}
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
python -c $"import os; [print(k) for k in os.environ.keys()]" > ~/Document/GitHub/dotfiles/env.txt
|
22
bin/watchit
22
bin/watchit
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "digest"
|
||||
|
||||
def compute_sha
|
||||
contents = Dir["./**/*.rs"].map do |file|
|
||||
File.read(file)
|
||||
end.join("\n")
|
||||
|
||||
Digest::MD5.hexdigest(contents)
|
||||
end
|
||||
|
||||
sha = compute_sha
|
||||
|
||||
loop do
|
||||
new_sha = compute_sha
|
||||
if sha != new_sha
|
||||
sha = new_sha
|
||||
system "clear && echo '#{'-'*80}' && cargo test"
|
||||
end
|
||||
sleep 1
|
||||
end
|
25
bin/youtube
25
bin/youtube
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "uri"
|
||||
|
||||
module Clipboard
|
||||
class << self
|
||||
def paste
|
||||
`pbpaste`.chomp
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def parse_params(url)
|
||||
url.query.split("&").each_with_object({}) do |param, acc|
|
||||
key, value = *param.split("=", 2)
|
||||
acc[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
url = URI.parse Clipboard.paste
|
||||
params = parse_params url
|
||||
id = params.fetch("v") { raise "Probably not a youtube URL" }
|
||||
|
||||
clean_url = "https://www.youtube.com/watch?v=#{id}"
|
||||
system "(cd ~/Downloads && youtube-dl -f best \"#{clean_url}\")"
|
Reference in New Issue
Block a user