Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
Steps to update local dev environment to PHP5.6 to be ready for Drupal 8. | |
In a terminal window: | |
brew update ( you may also may need brew doctor) | |
brew unlink php55 | |
brew install php56 --with-homebrew-apxs --with-apache | |
brew install php56-xdebug |
import PushNotification from 'react-native-push-notification'; | |
import OneSignal from 'react-native-onesignal'; | |
import { store, Settings } from './'; | |
import { Notifications } from '../actions'; | |
class NotificationController { | |
constructor () { | |
this.store = store; | |
this.token = null; |
$ sudo apt-get install mysql-server mysql-client | |
... output omitted ... | |
$ sudo mysqladmin -u root -h localhost password 'password' | |
... output omitted ... | |
$ mysql -u root -p | |
... output omitted ... | |
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'your_host_name' IDENTIFIED BY "password"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> FLUSH PRIVILEGES; |
Use Python to:
__author__ = 'srv' | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.application import MIMEApplication | |
username = '' # Email Address from the email you want to send an email | |
password = '' # Password | |
server = smtplib.SMTP('') |
import argparse | |
import re | |
from multiprocessing.pool import ThreadPool as Pool | |
import requests | |
import bs4 | |
root_url = 'http://pyvideo.org' | |
index_url = root_url + '/category/50/pycon-us-2014' | |
import argparse | |
import re | |
from multiprocessing.pool import ThreadPool as Pool | |
import requests | |
import bs4 | |
root_url = 'http://pyvideo.org' | |
index_url = root_url + '/category/50/pycon-us-2014' | |
var getPosition = function (options) { | |
return new Promise(function (resolve, reject) { | |
navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
}); | |
} | |
getPosition() | |
.then((position) => { | |
console.log(position); | |
}) |
const DOUBLE_PRESS_DELAY = 300; | |
// ... | |
/** | |
* Double Press recognition | |
* @param {Event} e | |
*/ | |
handleImagePress(e) { | |
const now = new Date().getTime(); |
/* Based on Sublime Text's Monokai theme */ | |
.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} | |
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} | |
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} | |
.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} | |
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} | |
.cm-s-monokai span.cm-comment {color: #75715e;} | |
.cm-s-monokai span.cm-atom {color: #ae81ff;} |