This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# edsh v1.4.27 - March 3, 2014 | |
_me="${0##*/}" | |
# Test for file name | |
[[ $# -ne 1 ]] && { echo -en "Usage:\t$_me command_name\n"; exit 1; } | |
_file=~/bin/$1 | |
# If needed, create a new command file | |
if [[ ! -e $_file ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# t-clean.py v1.2.22 - Friday, September 15, 2017 | |
# Cleanup Twitter Followings with Ruby Gem 't' and Python's language detect module | |
"""" | |
Long Records (follow, unfollow, groupies, whoami, etc.) | |
0 ID | |
1 Since | |
2 Last tweeted at | |
3 Tweets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# sql-ins-upd-ignore.py v1.0.0 - Tuesday, October 16, 2018 | |
# Ref1: https://stackoverflow.com/a/50718957/2719754 | |
# Ref2: https://www.sqlite.org/lang_UPSERT.html | |
""" | |
The UPSERT command is implemented by way of an ON CONFLICT clause | |
on the INSERT statement. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- # | |
from __future__ import unicode_literals | |
# 2019-Jun-19 PAL - This is for testing pelican-themes | |
from random import choice | |
import os, sys | |
sys.path.append(os.curdir) | |
# 2019-Jun-19 PAL - Load pelican-themes list (for testing) | |
from themes import Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# themes.py - Tuesday, June 18, 2019 | |
""" This list is for testing pelican-themes """ | |
Themes = [ | |
'pelican-themes/smoothie', 'pelican-themes/water-iris', | |
'pelican-themes/voidy-bootstrap', 'pelican-themes/dev-random', | |
'pelican-themes/hyde', 'pelican-themes/lab', | |
'pelican-themes/Casper2Pelican', 'pelican-themes/basic', | |
'pelican-themes/dev-random2', 'pelican-themes/subtle', | |
'pelican-themes/Responsive-Pelican', 'pelican-themes/plumage', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# pick_random_theme - Thursday, June 20, 2019 | |
""" This script will choose a random theme from pelican-themes and symlink it | |
in the project folder. Previously chosen themes are stored in TESTED_THEMES_FILENAME. | |
To loop through the themes again, delete TESTED_THEMES_FILENAME from disk or change | |
the filename. | |
Usage: pick_random_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py | |
index 5f8d90fb4..3cf8e408b 100644 | |
--- a/youtube_dl/extractor/twitter.py | |
+++ b/youtube_dl/extractor/twitter.py | |
@@ -392,6 +392,10 @@ class TwitterIE(TwitterBaseIE): | |
title = description = status['full_text'].replace('\n', ' ') | |
# strip 'https -_t.co_BJYgOjSeGA' junk from filenames | |
title = re.sub(r'\s+(https?://[^ ]+)', '', title) | |
+ # 2019-Nov-18 PAL - BEGIN Truncate long tweets to prevent 'Cannot write' errors | |
+ if len(title) > 200: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# crypto03.py - Monday, December 16, 2019 | |
# Ref: https://www.thepythoncode.com/article/encrypt-decrypt-files-symmetric-python | |
""" This is the best example of Fernet encryption that I have found """ | |
__version__ = '1.0.0' | |
from datetime import datetime | |
from shutil import copy2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# utils.py - Saturday, December 28, 2019 | |
# -*- coding: utf-8 -*- | |
""" I have been experimenting to see which web framework would make the better | |
wrapper for Tweepy. I decided on Django, with the Allauth package. | |
Afer going through the Django-Allauth Tutorial at | |
https://wsvincent.com/django-allauth-tutorial/ and playing with the DjangoTweepy repository at | |
https://github.com/martinjc/DjangoTweepy/blob/master/src/twitter_auth/utils.py, | |
this is what I contrived. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# update_settings - Monday, December 23, 2019 | |
__version__ = '1.1.10' | |
import os, re | |
from glob import glob | |
from os.path import basename, dirname, exists, getmtime, join | |
OlderNewer