Skip to content

Instantly share code, notes, and snippets.

View smohammadhn's full-sized avatar
👊
Achieving Goals ...

S.Mohammad Hosseininejad smohammadhn

👊
Achieving Goals ...
View GitHub Profile
@smohammadhn
smohammadhn / gist:68ce19da49ffbc74abb787be105f104a
Created August 22, 2024 11:59
Chrome disable CORS commad on MacOS:
open -na Google\ Chrome --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security
@smohammadhn
smohammadhn / gist:256786b34756f691717c1bf0d5fbbd27
Created April 22, 2024 15:15
Git delete all merged branches locally (except main and develop)
git branch --merged | egrep -v "(^\*|main|develop)" | xargs git branch -d
@smohammadhn
smohammadhn / gist:6b33aa4664c1b6253337e2656156039f
Created March 1, 2024 12:27
ffmpeg command to convert any video to a format which is widely known by older devices (Tvs, etc ...)
ffmpeg -i input.mp4 -vf "fps=24" -c:v libx264 -crf 23 -maxrate 2M -bufsize 2M -c:a aac -b:a 192k output.mp4
def change(string):
arr = ""
for char in string:
if char == "0":
arr += "1"
else:
arr += "0"
return arr