Skip to content

Commit aab1715

Browse files
committed
Updates
1 parent 91bb8ff commit aab1715

File tree

6 files changed

+259
-11
lines changed

6 files changed

+259
-11
lines changed

brew/Brewfile

+65-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
tap "eduardb/cask"
1+
tap "eduardb/mounty-legacy", "[email protected]:eduardb/homebrew-mounty-legacy.git"
2+
tap "getsentry/tools"
23
tap "github/gh"
34
tap "homebrew/bundle"
45
tap "homebrew/cask"
@@ -11,66 +12,126 @@ tap "jez/formulae"
1112
tap "nektos/tap"
1213
tap "sam701/awstools"
1314
tap "zaquestion/tap"
15+
brew "act"
1416
brew "adr-tools"
17+
brew "sqlite"
18+
brew "xz"
19+
1520
brew "autojump"
1621
brew "awscli"
22+
brew "bash"
1723
brew "bat"
24+
brew "glib"
25+
26+
brew "cocoapods", link: false
1827
brew "coreutils"
1928
brew "exa"
29+
brew "expect"
30+
brew "fastlane"
2031
brew "fd"
32+
brew "guile"
33+
brew "gnutls"
34+
brew "harfbuzz"
35+
brew "libass"
36+
brew "ffmpeg"
2137
brew "fzf"
2238
brew "gh"
2339
brew "git"
2440
brew "git-delta"
2541
brew "git-extras"
42+
brew "git-lfs"
2643
brew "git-secrets"
27-
brew "gnupg"
44+
brew "gnupg", link: false
2845
brew "gradle"
46+
brew "gradle-profiler"
47+
brew "pango"
48+
brew "librsvg"
2949
brew "graphviz"
50+
brew "grep"
3051
brew "htop"
3152
brew "hub"
3253
brew "imagemagick"
3354
brew "iperf3"
3455
brew "jenv"
3556
brew "jq"
57+
brew "kotlin"
3658
brew "lsd"
59+
brew "lsusb"
3760
brew "mas"
61+
brew "mitmproxy"
62+
brew "neofetch"
63+
brew "nmap"
3864
brew "node"
3965
brew "nvm"
66+
brew "onefetch"
67+
brew "openssl@3"
68+
brew "opus-tools"
69+
brew "pandoc"
70+
brew "pfetch"
71+
brew "pinentry-mac"
4072
brew "ripgrep"
73+
4174
brew "scrcpy"
4275
brew "speedtest-cli"
76+
brew "swiftlint"
4377
brew "telnet"
4478
brew "tldr"
4579
brew "trash"
4680
brew "tree"
81+
brew "vorbis-tools", link: false
4782
brew "wakeonlan"
4883
brew "wget"
4984
brew "yarn"
85+
brew "zlib"
5086
brew "zsh"
5187
brew "zsh-autosuggestions"
5288
brew "zsh-completions"
5389
brew "zsh-syntax-highlighting"
90+
brew "getsentry/tools/sentry-cli"
5491
brew "jez/formulae/git-heatmap"
55-
brew "nektos/tap/act"
5692
brew "sam701/awstools/awstools"
5793
cask "1password"
5894
cask "1password-cli"
5995
cask "authy"
96+
cask "bestres"
6097
cask "docker"
98+
cask "firefox"
99+
cask "flipper"
61100
cask "font-hack-nerd-font"
62101
cask "google-chrome"
102+
cask "gpg-suite"
63103
cask "iterm2"
64104
cask "jetbrains-toolbox"
65-
cask "mounty-at-1-9"
105+
cask "mounty-legacy"
106+
cask "ngrok"
107+
cask "notunes"
66108
cask "qlcolorcode"
67109
cask "qlmarkdown"
68110
cask "qlstephen"
69111
cask "qlvideo"
112+
cask "qmk-toolbox"
70113
cask "quicklook-json"
71114
cask "quicklookapk"
72115
cask "slack"
73116
cask "sublime-text"
74117
cask "suspicious-package"
118+
cask "telegram"
119+
cask "visual-studio-code"
120+
cask "vlc"
75121
cask "webpquicklook"
122+
cask "zoom"
123+
mas "1Password for Safari", id: 1569813296
124+
mas "Amphetamine", id: 937984704
125+
mas "Balance Lock", id: 1019371109
126+
mas "Disk Speed Test", id: 425264550
127+
mas "EasyRes", id: 688211836
76128
mas "Flycut", id: 442160987
129+
mas "GarageBand", id: 682658836
130+
mas "Hand Mirror", id: 1502839586
131+
mas "iMovie", id: 408981434
132+
mas "Keynote", id: 409183694
133+
mas "Numbers", id: 409203825
134+
mas "Pages", id: 409201541
135+
mas "RocketSim", id: 1504940162
136+
mas "Skitch", id: 425955336
137+
mas "Trello", id: 1278508951

git/gitconfig

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
11
[user]
22
name = Eduard-Cristian Boloș
3-
email = eduardcbolos@gmail.com
3+
email = [email protected].com
44
signingkey = 842479FDEFC8A69E
55
[core]
66
excludesfile = /Users/eduard/.gitignore_global
77
autocrlf = input
8-
pager = "delta --plus-color=\"#012800\" --minus-color=\"#340001\""
8+
pager = delta
99
[commit]
1010
gpgsign = true
1111
[alias]
1212
unstash = stash pop
1313
pull = pull --ff-only
14+
cor = !git for-each-ref --sort=-committerdate --format='%(refname:short) (%(committerdate:relative))' refs/heads | fzf --reverse --height 35% --nth 1 | awk '{print $1}' | xargs git checkout
15+
cleanup = !git branch --merged origin/dev | grep -v 'dev$' | xargs git branch -d
1416
[protocol]
1517
version = 2
1618
[gpg]
17-
program = gpg
19+
program = /usr/local/MacGPG2/bin/gpg
1820
[interactive]
19-
diffFilter = delta --color-only
21+
diffFilter = delta --color-only --features=interactive
2022
[pull]
2123
ff = only
2224
[init]
2325
defaultBranch = main
26+
[author]
27+
name = Eduard-Cristian Boloș
28+
[filter "lfs"]
29+
clean = git-lfs clean -- %f
30+
smudge = git-lfs smudge -- %f
31+
process = git-lfs filter-process
32+
required = true
33+
[difftool "sourcetree"]
34+
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
35+
path =
36+
[mergetool "sourcetree"]
37+
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
38+
trustExitCode = true
39+
[delta]
40+
line-numbers = true
41+
side-by-side = true
42+
plus-style = "syntax #003300"
43+
minus-style = "normal #340001"
44+
[merge]
45+
conflictstyle = diff3
46+
[push]
47+
autoSetupRemote = true

gradle/gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
org.gradle.daemon=true
33
org.gradle.parallel=true
44
org.gradle.caching=true
5-
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
5+
# org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
66

77
#org.gradle.unsafe.watch-fs=true
88
org.gradle.vfs.watch=true
@@ -11,3 +11,6 @@ kotlin.code.style=official
1111
kapt.incremental.apt=true
1212

1313
gradle.daemon.xmx.mb=3096
14+
15+
# org.gradle.unsafe.configuration-cache=true
16+
# org.gradle.unsafe.configuration-cache-problems=warn

install.conf.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
~/.gradle/gradle.properties: gradle/gradle.properties
1919
/usr/local/bin/readydocker.sh: scripts/readydocker.sh
2020
/usr/local/bin/docker_cleanup.sh: scripts/docker_cleanup.sh
21+
/usr/local/bin/giffify.py: scripts/giffify.py
2122

2223
- shell:
2324
-

scripts/giffify.py

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/usr/bin/python
2+
3+
# License for any modification to the original (linked below):
4+
# ----------------------------------------------------------------------------
5+
# "THE BEER-WARE LICENSE" (Revision 42):
6+
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
7+
# this notice you can do whatever you want with this stuff. If we meet some day,
8+
# and you think this stuff is worth it, you can buy us a beer in return.
9+
10+
import argparse, sys, subprocess, tempfile
11+
from os.path import splitext
12+
from distutils.spawn import find_executable
13+
14+
def look_for_ffmpeg_or_abort():
15+
ffmpeg_path = find_executable('ffmpeg')
16+
if ffmpeg_path == None:
17+
print("** ComputerSaysNoError **")
18+
print("You need to have ffmpeg installed on your system and on the path for Giffify to work")
19+
exit(1)
20+
21+
def parse_cli_arguments():
22+
parser = argparse.ArgumentParser(description='Processes a video into a gif.')
23+
parser.add_argument('video', type=str, help='The video to be processed')
24+
parser.add_argument('-o', '--outfile', type=str, help='Target path')
25+
parser.add_argument('-dw', '--desired-width', type=int, default=-1)
26+
parser.add_argument('-dh', '--desired-height', type=int, default=-1)
27+
parser.add_argument('-f', '--fps', type=int, default=15, help='Output frames per second. Default: 15 fps')
28+
parser.add_argument('-s', '--start-time', type=int, default=-1, help='Start timestamp, as [-][HH:]MM:SS[.m...] or [-]S+[.m...]')
29+
parser.add_argument('-e', '--end-time', type=int, default=-1, help='End timestamp, as [-][HH:]MM:SS[.m...] or [-]S+[.m...]. Overridden by -d')
30+
parser.add_argument('-d', '--duration', type=int, default=-1, help='Duration, as [-][HH:]MM:SS[.m...] or [-]S+[.m...]. Overrides -e')
31+
parser.add_argument('-c', '--crop', type=str, help='Output crop, as per ffmpeg\'s crop filter specs (i.e., out_w:out_h:x:y)')
32+
parser.add_argument('-r', '--rotate', dest='rotate', action='store_true', help='Rotate output 270 degrees clockwise (useful for Genymotion)')
33+
34+
return parser.parse_args()
35+
36+
def gif_path(path):
37+
return splitext(path)[0] + '.gif'
38+
39+
def get_palette_path():
40+
try:
41+
palette_file = tempfile.NamedTemporaryFile()
42+
return palette_file.name + '.png'
43+
finally:
44+
palette_file.close()
45+
46+
def insert_before_output_path(args, elements):
47+
index = args.index('-y')
48+
return args[:index] + elements + args[index:]
49+
50+
look_for_ffmpeg_or_abort()
51+
52+
args = parse_cli_arguments()
53+
54+
input_path = args.video
55+
output_path = gif_path(input_path) if args.outfile is None else args.outfile
56+
57+
fps = args.fps
58+
59+
dw = args.desired_width
60+
dh = args.desired_height
61+
62+
s = args.start_time
63+
e = args.end_time
64+
d = args.duration
65+
c = args.crop
66+
67+
if args.rotate:
68+
rotate_filters = 'transpose=2,'
69+
else:
70+
rotate_filters = ""
71+
72+
if c is not None:
73+
crop_filter = "crop={crop},".format(crop = c)
74+
else:
75+
crop_filter = ""
76+
77+
filters = "{rotate}{crop}fps={fps},scale={dw}:{dh}:flags=lanczos".format(rotate = rotate_filters, crop = crop_filter, fps = fps, dw = dw, dh = dh)
78+
79+
palette_filters = "{filters},palettegen".format(filters = filters)
80+
palette_path = get_palette_path()
81+
82+
output_filters = "{filters} [x]; [x][1:v] paletteuse".format(filters = filters)
83+
84+
ffmpeg_args_palette = ['ffmpeg',
85+
'-v', 'warning',
86+
'-i', input_path,
87+
'-vf', palette_filters,
88+
'-y', palette_path]
89+
ffmpeg_args_gif = ['ffmpeg',
90+
'-v', 'warning',
91+
'-i', input_path,
92+
'-i', palette_path,
93+
'-lavfi', output_filters,
94+
'-y', output_path]
95+
96+
if s != -1:
97+
ffmpeg_args_gif = insert_before_output_path(ffmpeg_args_gif, ["-ss", str(s)])
98+
99+
if e != -1:
100+
ffmpeg_args_gif = insert_before_output_path(ffmpeg_args_gif, ["-to", str(e)])
101+
102+
if d != -1:
103+
ffmpeg_args_gif = insert_before_output_path(ffmpeg_args_gif, ["-t", str(d)])
104+
105+
print("First pass: extracting colour palette, hang tight...")
106+
subprocess.call(ffmpeg_args_palette)
107+
108+
print("Second pass: converting that nice video into a sweet, high quality gif...")
109+
subprocess.call(ffmpeg_args_gif)
110+
111+
print("Done! Now go and show off to your friends and colleagues")

0 commit comments

Comments
 (0)