北京自动定饭脚本
节约粮食人人有则
| --- | |
| - hosts: ec2 | |
| vars: | |
| timestamp: "{{ lookup('pipe', 'date +%Y%m%d\\ %H%M%S') }}" | |
| roles: | |
| - include: includes/common_roles.yml | |
| pre_tasks: |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "fmt" | |
| "github.com/icub3d/wrapio" | |
| "io" |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Ext JS Grid Example</title> | |
| <script src="http://cdn.sencha.io/ext-4.0.7-gpl/ext-all.js"> </script> | |
| <link rel="stylesheet" href="http://cdn.sencha.io/ext-4.0.7-gpl/resources/css/ext-all.css" /> |
北京自动定饭脚本
节约粮食人人有则
| // Moved to https://github.com/temoto/meetup |
| Go Package Management | |
| interface type version | |
| type version interface { | |
| string Version() | |
| } |
| import ( | |
| "io" | |
| "net/http" | |
| ) | |
| //With HandlerFunc | |
| func main () { | |
| http.Handle("/", JsonpHandler(http.HandlerFunc(func (w http.ResponseWriter, r *http.Request) { | |
| w.Write("Hello World") | |
| }))) |
| # Copyright (c) 2013, Andrea Grandi and individual contributors. | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without modification, | |
| # are permitted provided that the following conditions are met: | |
| # | |
| # 1) Redistributions of source code must retain the above copyright notice, | |
| # this list of conditions and the following disclaimer. | |
| # | |
| # 2) Redistributions in binary form must reproduce the above copyright notice, |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "runtime" | |
| "sync" | |
| "sync/atomic" | |
| "time" | |
| ) |
| from datetime import datetime, timedelta | |
| import sqlalchemy as sa | |
| import sqlalchemy.orm as orm | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import scoped_session, sessionmaker | |
| NOW = datetime.utcnow() | |
| DBSession = scoped_session(sessionmaker()) | |
| Base = declarative_base() |