Skip to content

Instantly share code, notes, and snippets.

View ekhaydarov's full-sized avatar
🐢

Erkin Khaydarov ekhaydarov

🐢
View GitHub Profile
@ymollard
ymollard / clean_git_repository.bash
Created February 4, 2016 00:54
Clean a git repository by deleting history and data of old deleted files
#!/bin/bash
# This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches
# It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged
# time ./clear_git_repositor.bash >cleaning.log
# We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming)
# MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files
MAXIMUM_PASSES=10 # Maximum number of passes
@revox
revox / tweepytest.py
Last active May 28, 2021 14:12
Use tweepy to write some tweet info into a CSV file
import time
import tweepy
import csv
# == OAuth Authentication ==
# The consumer keys can be found on your application's Details
# page located at https://dev.twitter.com/apps (under "OAuth settings")
consumer_key="your key"
consumer_secret="your secret"