sudo apt-get -y install cups
sudo usermod -a -G lpadmin pi
sudo nano /etc/cups/cupsd.conf
comment out: Listen localhost:631
and replace with: Port 631
import subprocess | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
import datetime | |
# Change to your own account information | |
to = 'me@example.com' | |
gmail_user = 'test@gmail.com' | |
gmail_password = 'yourpassword' | |
smtpserver = smtplib.SMTP('smtp.gmail.com', 587) |
// when using the jquery.validation plugin with a tinymce textarea you will need to write the contents of the tinymce area back into the original textarea for jquery.validation to pick up it's new value | |
// force tinymce content to be written back into original textarea element | |
var content = tinyMCE.activeEditor.getContent(); | |
$("textarea.tinymce").val(content); | |
// if all else fails | |
tinyMCE.triggerSave(); | |
after this you can safely apply jquery validation ala... |
# Prompt | |
# local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" | |
# PROMPT=' | |
# %~ | |
# ${smiley} %{$reset_color%}' | |
# RBENV | |
# RPROMPT='%{$fg[white]%} $(rbenv version-name)$(~/.dotfiles/bin/git-cwd-info.rb)%{$reset_color%}' |
sudo apt-get -y install cups
sudo usermod -a -G lpadmin pi
sudo nano /etc/cups/cupsd.conf
comment out: Listen localhost:631
and replace with: Port 631
This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.
This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)
Make sure you have the latest version of XCode installed. Available from the Mac App Store.
Install the Xcode Command Line Tools:
xcode-select --install
products.collection.group(:key => 'family', :initial => {count: 0}, :reduce => "function(doc,prev) { prev.count += +1; }") | |
products.collection.group(:keyf => 'function(doc) { return {family: doc.family};}', :initial => {count: 0}, :reduce => "function(doc,prev) { prev.count += +1; }", :finalize => 'function(doc) { doc; }') |
for a Linksys WRT54G router (v2.0)