Skip to content

Instantly share code, notes, and snippets.

# Import packages and config
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from config import consumer_key, consumer_secret, access_token, access_token_secret
import datetime
import csv
# Takes tweets and a designated csv file and writes them to it.
@tonydspaniard
tonydspaniard / download_emails.py
Created April 22, 2020 21:09 — forked from PandaWhoCodes/download_emails.py
A script to download emails from gmail - http://www.ashish.ch
import imaplib
import email
import os
def create_folder(folder_name="backup"):
"""
Creates a folder to store all mails
"""
if not os.path.exists(folder_name):
@tonydspaniard
tonydspaniard / gmail_imap_example.py
Created April 22, 2020 20:55 — forked from robulouski/gmail_imap_example.py
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
"Source","Feed","Rank","Tags"
Barrons,http://online.barrons.com/xml/rss/3_7534.xml,5,News
Barrons,http://blogs.barrons.com/focusonfunds/feed/,5,Blog
Barrons,http://blogs.barrons.com/techtraderdaily/feed/,5,Blog
Barrons,http://blogs.barrons.com/stockstowatchtoday/feed/,5,Blog
Barrons,http://online.barrons.com/xml/rss/3_7563.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7560.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7533.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7535.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7544.xml,5,News
http://feeds.reuters.com/news/artsculture
http://feeds.reuters.com/reuters/businessNews
http://feeds.reuters.com/reuters/companyNews
http://feeds.reuters.com/reuters/entertainment
http://feeds.reuters.com/reuters/environment
http://feeds.reuters.com/reuters/healthNews
http://feeds.reuters.com/reuters/lifestyle
http://feeds.reuters.com/news/reutersmedia
http://feeds.reuters.com/news/wealth
http://feeds.reuters.com/reuters/MostRead
@tonydspaniard
tonydspaniard / gitlog-grep-delete
Last active October 10, 2019 22:00
Find deleted files on git
git log --diff-filter=D --summary | grep -E 'delete|^commit\s+\S+
@tonydspaniard
tonydspaniard / convertSegwit.js
Created January 22, 2018 08:03 — forked from junderw/convertSegwit.js
Convert all your existing addresses from bitcoind to segwit P2SH addresses (multisig will not work)
'use strict';
// first, run sudo apt-get install jq nodejs npm
// second, run npm install bluebird co to install dependencies, and make sure bitcoin-cli can run these commands.
// third, run node thisScript.js and it will change all the addresses on your bitcoind into segwit addresses.
var Promise = require('bluebird');
var co = require('co');
var exec = Promise.promisify(require('child_process').exec);
var main = function() {
@tonydspaniard
tonydspaniard / index.html
Created September 21, 2017 09:52 — forked from alexandrevicenzi/index.html
Bootstrap CSS Animate Loading Icon Button
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
@tonydspaniard
tonydspaniard / git-tag-delete-local-and-remote.sh
Created July 23, 2017 17:56 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@tonydspaniard
tonydspaniard / fix_git_sslread_9806.sh
Created May 15, 2017 20:33 — forked from entropiae/fix_git_sslread_9806.sh
git: how to solve "SSLRead() return error -9806" in OSX using brew
$ brew remove git
$ brew remove curl
$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git