Skip to content

Instantly share code, notes, and snippets.

View iamrony777's full-sized avatar
🍥
Dattebayo!

Ronit Sarkar iamrony777

🍥
Dattebayo!
View GitHub Profile
@Zearin
Zearin / python_decorator_guide.md
Last active April 26, 2025 15:21
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@magnetikonline
magnetikonline / README.md
Last active April 24, 2025 14:47
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@0xjac
0xjac / private_fork.md
Last active May 11, 2025 03:18
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@markuscraig
markuscraig / sync_gdrive.py
Last active January 7, 2025 07:54
Rclone + Google Drive sync script
#!/usr/bin/env python
import os
import shutil
import subprocess
# global variables
SYNC_DIRS = [
{
'src': "/Volumes/PhotoArchive/Lightroom",
@mgithens1
mgithens1 / autoport_autobind_transmission.sh
Last active March 15, 2024 08:03
Bash script for updating Transmission IP/port for Private Internet Access via OpenVPN.
#!/bin/sh
# FILL OUT YOUR INFO HERE
LOGIN=PIA LOGIN HERE
PASSWORD=PIA PASSWORD HERE
USER=TRANSMISSION LOGIN HERE
PASS=TRANSMISSION PASSWORD HERE
BIN="/usr/bin/transmission-remote"
LOGGING="/home/USERNAME/transmission_logging.txt"
@dideler
dideler / bot.rb
Last active May 7, 2025 12:44
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@theclashoftitans
theclashoftitans / badjav.txt
Last active November 2, 2022 06:51
Bad JAV Sites
! Title: Bad JAV sites
! Homepage: https://gist.github.com/theclashoftitans/08ae50b813cab62466b5e2995e3683ac
! Expires: 1 days
! To use this list, add the URL as a 3rd party filter in your AdBlock (or alike) plug-in.
! Deceptive, malicious or fake sites, or sites created to intentionally pollute search results.
! Also includes filters for ads.
! Report false positives to theclashoftitans at users.noreply.github.com
@jaradc
jaradc / keyword_grouping_in_python.py
Created July 31, 2019 05:00
Basic Keyword Clustering Example in Python
import pandas as pd
import numpy as np
from nltk.stem import PorterStemmer, WordNetLemmatizer
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn import cluster
stemmer = PorterStemmer()
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 11, 2025 10:37
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !