Skip to content

Instantly share code, notes, and snippets.

View adityatelange's full-sized avatar
🚧
Opinions are my own

Aditya Telange adityatelange

🚧
Opinions are my own
View GitHub Profile
@adityatelange
adityatelange / ghidra-sre.md
Created July 6, 2021 05:09
Adding Ghidra App Shortcut in Launcher and side bar and ubuntu

Example .desktop at ~/.local/share/applications/ghidra-sre.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Ghidra
Type=Application
Terminal=false
Path=/home/aditya/Apps/ghidra_10.0_PUBLIC/
Exec=/home/aditya/Apps/ghidra_10.0_PUBLIC/ghidraRun
@adityatelange
adityatelange / youtube_hd.user.js
Created June 3, 2021 17:23 — forked from adisib/youtube_hd.user.js
Make youtube videos in HD and automatically resize
// ==UserScript==
// @name Youtube HD
// @author adisib
// @namespace namespace_adisib
// @description Select a youtube resolution and resize the player.
// @version 2021.01.02
// @match https://www.youtube.com/*
// @noframes
// @grant none
// ==/UserScript==
<!-- contents of render-image.html -->
{{- $link := split .Destination "#" }}
{{- $image := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (index $link 0)) }}
{{- $logo := (resources.Get "images/logo.png") }}
{{- if and $image $logo }}
{{- $size := math.Round (mul $image.Height 0.25) }}
{{- $size := cond (ge $size 80) ($size) (80.0) }}
{{- $logo := $logo.Resize (printf "%.0fx jpg" $size) }}
@adityatelange
adityatelange / WhatsAppWeb.md
Created March 15, 2021 08:12
create WhatsAppWeb native app for Ubuntu 20.10
@adityatelange
adityatelange / Postman.desktop
Created February 19, 2021 05:54
Adding icon launcher for Postman Native App in Ubuntu/GNOME based DE
# location: ".local/share/applications/Postman.desktop"
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Path=/opt/Postman
Exec=/opt/Postman/Postman
@adityatelange
adityatelange / ngrok-dir-share.txt
Created February 13, 2021 09:27
share directory with ngrok
ngrok http file:///some/dir
# with basic auth
ngrok http file:///some/dir -auth="user:pass"
# credits https://twitter.com/Regala_/status/1360193684663242759?s=20
@adityatelange
adityatelange / recursive_unzip.py
Created January 22, 2021 11:27
recursively unzip a zip file with python
#!/usr/bin/python3
# og source: https://gist.github.com/JamesPHoughton/0f4f269e93a2b85958d8
from zipfile import ZipFile
def unpack_zip(zipfile='', path_from_local=''):
filepath = path_from_local+zipfile
extract_path = filepath.strip('.zip') + '/'
@adityatelange
adityatelange / janpatch-android-security-10.0.0_r49-android-security-10.0.0_r50.txt
Created January 15, 2021 18:46
Contains patch commits for AOSP 10 january 2021 ASB
project external/freetype/
c3a3f04 Cherry-pick one upstream patch
project external/gptfdisk/
886331c RESTRICT AUTOMERGE ANDROID: Fix negative stack write in sgdisk
project external/libexif/
065ec3f fixes some (not all) buffer overreads during decoding pentax makernote entries.
project frameworks/av/
@adityatelange
adityatelange / hugoUp.sh
Last active November 6, 2022 05:46
Update Hugo [not extended] on Ubuntu / Deb amd64
#!/bin/bash
url=$(wget -O- -q https://api.github.com/repos/gohugoio/hugo/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "linux-amd64.deb" | grep -v "hugo_extended")
# url=$(wget -O- -q --header="Authorization: token xyzABC" https://api.github.com/repos/gohugoio/hugo/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "linux-amd64.deb" | grep -v "hugo_extended")
version=$(echo $url | cut -d '/' -f 8 | cut -d 'v' -f 2)
name=$(echo $url | cut -d '/' -f 9)
checksums_url="https://github.com/gohugoio/hugo/releases/download/v${version}/hugo_${version}_checksums.txt"
installed_ver=$(hugo version | cut -d "v" -f 2 | cut -d "-" -f 1)