Skip to content

Instantly share code, notes, and snippets.

View deepakpk009's full-sized avatar
👋
Android & Roku Development

Deepak PK deepakpk009

👋
Android & Roku Development
View GitHub Profile
@deepakpk009
deepakpk009 / gist:0bbcd41b0c1448cf9c76c2cfad328802
Created December 15, 2023 12:12
Internet Sharing Is Not Working On Mac Using Wi-Fi Or Ethernet After Update To Sonoma
try restarting the wifi device, bluetooth device and laptop
Please comment if you had to use any other method to get this working 🙏
How to reset a branch to a commit:
git checkout <branch-name>
git reset --hard <commit-hash>
git push --force origin <branch-name>
Then to check it (it shouldn't print any diff)
git diff <branch-name>..origin/<branch-name>
@deepakpk009
deepakpk009 / gist:5e763f8d4b6e5213490032b77db44bf6
Created November 8, 2019 08:42
How to check if APK is signed or “debug build”?
If you want to check an APK statically, you could use
aapt dump badging /path/to/apk | grep -c application-debuggable
@deepakpk009
deepakpk009 / gist:6fd67beba1da683cd96a3db0a02ac9ca
Created October 14, 2019 10:59
Android Studio inline compiler showing red errors, but compilation with gradle works fine
The following steps helps
1. Close your project, and in your project folder delete project/.idea/libraries and project/.idea/caches
2. Delete ~/.gradle folder.
3. restart it from File > Invalidate Caches/ Restart and click in the Just restart, no need to 'close' it.
If still it does not work then:
1. update the library version in gradle with any random number, and sync.
2. this will show error.
If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the job—for example:
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
@deepakpk009
deepakpk009 / gist:5ac411fce3b1fddb72cc193ef5c9c0ec
Created April 30, 2019 06:37
convert mov to mp4 and remove audio using ffmpeg
Convert mov to mp4:
ffmpeg -i input.mov -vcodec h264 -acodec aac -strict -2 output.mp4
Remove audio:
ffmpeg -i input.mp4 -an -vcodec copy output.mp4
@deepakpk009
deepakpk009 / pdf_compress.txt
Created March 5, 2019 10:44
reduce pdf size / compress pdf in ubuntu
execute below commnad in terminal:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
/screen - Lowest quality, lowest size
/ebook - Moderate quality
/printer - Good quality
/prepress - Best quality, highest size
@deepakpk009
deepakpk009 / gist:42987352fef0f9a352d5af7d4b06918d
Created January 18, 2019 13:07
ffmpeg conversion samples
convert .mov to .mp4
ffmpeg -i videoName.mov -vcodec h264 -acodec mp2 videoName.mp4
convert .mov to .webm
ffmpeg -i videoName.mov -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis videoName.webm
convert .mov to .ogg
ffmpeg -i videoName.mov -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 videoName.ogg
@deepakpk009
deepakpk009 / gist:e9964b5d30357857b3e3267feb84d5c4
Created January 2, 2019 09:46
FFMPEG video file size reduce
ffmpeg -i input.mp4 -vcodec h264 -b:v 1000k -acodec mp3 output2.mp4
ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4