Skip to content

Instantly share code, notes, and snippets.

View umrashrf's full-sized avatar
🏠
Working from home

Umair Ashraf umrashrf

🏠
Working from home
View GitHub Profile
@umrashrf
umrashrf / InstagramHelper.js
Created March 30, 2023 23:50 — forked from james-harper/InstagramHelper.js
Instagram.com - Unsend All Messages
// instagram.com utilities
//
// currently I only have unsend all messages in thread implemented.
// but may add more if I need them
// (this won't work in incognito due to localStorage, session, & cookie values being required)
//
// To use, navigate to the thread in a web browser (I only tested with Chrome)
// and copy and paste the code into a Developer tools console
// "threadId" will need to be updated with the appropriate value
class InstagramHelper {
@umrashrf
umrashrf / docker_rmi.sh
Created October 3, 2019 15:31
Delete all docker images except listed by names
docker rmi -f $(docker images | grep -v -E '^python|^postgres|^redis|^scrapinghub' | grep -oE '[a-z0-9]{12}')
@umrashrf
umrashrf / kijiji_photos.py
Created August 4, 2019 23:04
Kijiji photo downloader in Python
photos = [
'https://i.ebayimg.com/00/s/MTA2N1gxNjAw/z/kXAAAOSwqYxdHbfJ/$_59.JPG',
]
import re
import urllib
basename = re.compile('/z/(.*)')
def fname(url):
"""
Generalized browser module for selenium web driver
"""
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from . import settings
[vagrant@localhost qt-everywhere-opensource-src-4.8.6]$ yes | ./configure -opensource -no-webkit -fast
This is the Open Source Edition.
You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.
Type '3' to view the GNU General Public License version 3.
This file has been truncated, but you can view the full file.
../../../../include/QtGui -I../../../../include/QtXml -I../../../../include/QtScript -I../../../../include -Iextension -Isdk -Iuilib -Ishared -I../../../shared/qtpropertybrowser -I../../../shared/deviceskin -I../../../../src/tools/rcc -I../../../shared/findwidget -I../../../shared/qtgradienteditor -I.moc/release-shared -I.uic/release-shared -o .obj/release-shared/qtgradientutils.o ../../../shared/qtgradienteditor/qtgradientutils.cpp
@umrashrf
umrashrf / extract_attachments.py
Last active February 18, 2019 13:48
Download emails from GMail API and extract files from each email using Python and GYB
import os
import sys
import email
for line in sys.stdin:
fle = line.strip()
if str.lower(fle[-3:]) == "eml":
msg = email.message_from_file(open(fle))
attachments = msg.get_payload()
for attachment in attachments:
@umrashrf
umrashrf / aws_ses.bash
Created July 26, 2016 19:05
Amazon AWS CLI - SES SEND EMAIL
sudo pip install awscli
aws configure
aws ses send-email \
--from "john@gmail.com" \
--destination "ToAddresses=mike@gmail.com" \
--message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}"
0 236 254 249 362 243 316 225 270 297 379 312 260 305 335 272 258 321 306 352 315 371 286 338 207 352 355 264 298 324 250 289 313 269 269 313 319 276 204 288 248 362 352 235 251 319 334 335 270 269 265 282 303 276 245 303 302 332 280 294 244 280 305 234 264 358 339 362 275 301 256 253 242 300 285 292 281 256 327 238 212 304 353 266 325 320 297 352 293 325 290 332 306 255 335 341 317 278 303 281
236 0 295 226 371 245 381 325 266 272 264 229 374 271 222 317 359 295 264 253 327 233 224 292 311 378 307 356 323 317 365 297 340 306 316 253 312 279 244 291 342 278 315 249 315 286
@umrashrf
umrashrf / git_watch_duster.bash
Last active August 23, 2021 11:11
Unwatch github repositories in shell
#!/bin/bash
read -p "Github Username: " username;
read -p "Github Token (https://github.com/settings/tokens): " token;
echo "Fetching your repositoreis...";
echo;
repos=$(curl -i -u "$username:$token" "https://api.github.com/user/subscriptions" |\
grep -Po '(?<="full_name": ").*(?=\")');