This file contains hidden or 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 | |
# | |
# Reads AirTag data from the FindMy.app cache and converts it to a daily GPX file | |
# | |
# Rsyncs the data to a web accessible folder that can be displayed with e.g. | |
# https://gist.github.com/henrik242/84ad80dd2170385fe819df1d40224cc4 | |
# | |
# This should typically be run as a cron job | |
# |
This file contains hidden or 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
site | |
nytimes.com | |
telegraph.co.uk | |
wsj.com | |
forbes.com | |
washingtonpost.com | |
latimes.com | |
usatoday.com | |
businessinsider.com | |
independent.co.uk |
This file contains hidden or 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
(?:(?:\+?([1-9]|[0-9][0-9]|[0-9][0-9][0-9])\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([0-9][1-9]|[0-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))? | |
/a tweaked version of the second regex in the question here to allow for all country codes and leading zeros in area codes: https://stackoverflow.com/questions/3868753/find-phone-numbers-in-python-script |
This file contains hidden or 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
import smtplib | |
import os | |
def send_email(host, port, username, password, subject, body, mail_to, mail_from = None, reply_to = None): | |
if mail_from is None: mail_from = username | |
if reply_to is None: reply_to = mail_to | |
message = """From: %s\nTo: %s\nReply-To: %s\nSubject: %s\n\n%s""" % (mail_from, mail_to, reply_to, subject, body) | |
print (message) | |
try: |
This file contains hidden or 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
name | industry | sector | website | rank | |
---|---|---|---|---|---|
Walmart | General Merchandisers | Retailing | http://www.walmart.com | 1 | |
Exxon Mobil | Petroleum Refining | Energy | http://www.exxonmobil.com | 2 | |
Chevron | Petroleum Refining | Energy | http://www.chevron.com | 3 | |
Berkshire Hathaway | Insurance: Property and Casualty (Stock) | Financials | http://www.berkshirehathaway.com | 4 | |
Apple | Computers, Office Equipment | Technology | http://www.apple.com | 5 | |
General Motors | Motor Vehicles and Parts | Motor Vehicles & Parts | http://www.gm.com | 6 | |
Phillips 66 | Petroleum Refining | Energy | http://www.phillips66.com | 7 | |
General Electric | Diversified Financials | Financials | http://www.ge.com | 8 | |
Ford Motor | Motor Vehicles and Parts | Motor Vehicles & Parts | http://www.ford.com | 9 |
This file contains hidden or 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
1033edge.com | |
11mail.com | |
123.com | |
123box.net | |
123india.com | |
123mail.cl | |
123qwe.co.uk | |
126.com | |
150ml.com | |
15meg4free.com |
This file contains hidden or 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
locate my.cnf | |
change character set and collation | |
[mysqld] | |
character_set_server = utf8 | |
collation_server = utf8_general_ci | |
in console if your database is not huge. |