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 socket, ssl, json, struct | |
| import binascii | |
| def Payload(alert='', badge=1, data={}): | |
| payload = { | |
| 'aps': { | |
| 'alert':alert, | |
| 'sound':'k1DiveAlarm.caf', | |
| 'badge':badge, | |
| }, |
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
| .img-circle{behavior:url(/scripts/PIE.htc)} | |
| .img-rounded{behavior:url(/scripts/PIE.htc)} | |
| .img-thumbnail{behavior:url(/scripts/PIE.htc)} | |
| .table-bordered{behavior:url(/scripts/PIE.htc)} | |
| select,textarea,input,code,pre,kbd,pre{behavior:url(/scripts/PIE.htc)} | |
| .input-group-addon{behavior:url(/scripts/PIE.htc)} | |
| .btn{behavior:url(/scripts/PIE.htc)} | |
| .dropdown-menu{behavior:url(/scripts/PIE.htc)} | |
| .form-control{behavior:url(/scripts/PIE.htc)} | |
| .panel{behavior:url(/scripts/PIE.htc)} |
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
| class LoginForm(flask_wtf.Form): | |
| """ | |
| Validate login from | |
| """ | |
| email_validator = [flask_wtf.Required()] | |
| pwd_validator = [flask_wtf.Required(), flask_wtf.Length(2)] | |
| email = flask_wtf.TextField(u'email', validators=email_validator) | |
| password = flask_wtf.PasswordField(u'password', validators=pwd_validator) | |
| submit = flask_wtf.SubmitField("Login") |
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
| . | |
| ├── deploy.py | |
| ├── project | |
| │ ├── application.py | |
| │ ├── apps | |
| │ │ ├── articles | |
| │ │ │ ├── forms.py | |
| │ │ │ ├── __init__.py | |
| │ │ │ ├── models.py | |
| │ │ │ └── views.py |
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 sqlalchemy as sa | |
| import sqlalchemy.orm as orm | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from sqlalchemy.orm import scoped_session, sessionmaker | |
| DBSession = scoped_session(sessionmaker()) | |
| class BaseMixin(object): | |
| query = DBSession.query_property() | |
| id = sa.Column(sa.Integer, primary_key=True) |
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 tasks from Things to OmniFocus | |
| -------------------------------------------------- | |
| -------------------------------------------------- | |
| -- | |
| -- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 | |
| -- | |
| -- Added: creation date, due date, start date functionality |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content="Short example on using indexedDB with jquery mobile - last updated: May 2012"> | |
| <meta name="author" content="Ido Green"> | |
| <title>IndexedDB with JQM</title> |
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/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' |
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 tornado.ioloop | |
| import tornado.web | |
| import tornado.escape | |
| import tornado.options | |
| import tornado.httputil | |
| import jinja2 | |
| import pyjade.compiler | |
| import coffeescript | |
| import markdown |
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
| require 'gollum/frontend/app' | |
| require 'digest/sha1' | |
| class App < Precious::App | |
| User = Struct.new(:name, :email, :password_hash, :can_write) | |
| before { authenticate! } | |
| before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end | |
| helpers do |