Skip to content

Instantly share code, notes, and snippets.

View hosamn's full-sized avatar
🎯
Focusing

Hosam hosamn

🎯
Focusing
View GitHub Profile
@sleirsgoevy
sleirsgoevy / serve_img.sh
Created December 14, 2021 15:42
Script for enabling mass storage emulation on rooted Samsung phones
A=/sys/class/android_usb/android0
set -x
killall -STOP adbd
sleep 1
echo 0 > $A/enable
echo mass_storage > $A/functions
echo disk > $A/f_mass_storage/luns
echo 1 > $A/enable
sleep 1
@onmyeoin
onmyeoin / tweet_dumper.py
Last active January 31, 2023 12:14 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy
import csv
def get_all_tweets(screen_name):
consumer_key = ""
consumer_secret = ""
@pratikone
pratikone / tweetthreader.py
Created March 17, 2020 02:30
This script fetches and creates threads from twitter statuses of a twitter profile. A thread is a series of tweets created by replying to your own tweet.
import os
import re
import time
from collections import namedtuple
import codecs
import tweepy
import json
from datetime import datetime
from requests.exceptions import Timeout, ConnectionError
from requests.packages.urllib3.exceptions import ReadTimeoutError, ProtocolError
@YuniorGlez
YuniorGlez / 0.README.md
Last active December 3, 2022 02:03 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() or showDialogs() to get the list of contacts with ids or the 20 last conversations in the same order of the client view
  4. Run saveChat(userId) where userId is the id from step 3 (inside the [] )

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@dikiaap
dikiaap / git-io-custom-url.md
Last active August 5, 2023 04:21
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@agentcooper
agentcooper / 0.README.md
Last active January 31, 2024 14:09
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@nebadon2025
nebadon2025 / gist:3143d837350ab443482b0f5a6faccd6b
Last active February 13, 2022 13:52
Full Screen Youtube Autoplay URL format
https://www.youtube.com/embed/HH0zOJVOzxs?rel=0&autoplay=1;fs=0;autohide=0;hd=0;mute=1;
@yanofsky
yanofsky / LICENSE
Last active February 25, 2024 12:21
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@przemoc
przemoc / gitio
Last active February 2, 2022 11:59
Turn a github.com URL into a git.io URL.
#!/bin/sh
# SPDX-License-Identifier: MIT
## Copyright (C) 2011 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Usage: gitio URL [CODE]
#