start new:
tmux
start new with session name:
tmux new -s myname
""" | |
SQLAlchemy Enum type based on Integer indices. | |
""" | |
from sqlalchemy import types | |
class Enum(types.TypeDecorator): | |
impl = types.Integer | |
def __init__(self, value_map, strict=True, *args, **kw): | |
"""Emulate Enum type with integer-based indexing. |
<html> | |
<head></head> | |
<body style="background-color:#1c1c1c;margin:0"> | |
<div style="border-top:1px solid #404040"> | |
<div style="color:#fff;;padding:10px">Welcome to Titanium</div> | |
</div> | |
<script type="text/javascript"> | |
var eventName = 'randomEvent'; |
db_path = Titanium.Filesystem.getFile(Titanium.Filesystem.getApplicationDataDirectory(), 'gtasktic.db'); | |
db = Titanium.Database.openFile( db_path ); | |
db.execute("CREATE TABLE IF NOT EXISTS keyval ( key TEXT, value TEXT )"); | |
//Insert | |
db.execute("INSERT INTO keyval (key, value) VALUES ('" +this.name +"', '"+ result +"')"); | |
//Read | |
var resultSet = db.execute("SELECT value FROM keyval WHERE key = '"+ this.name +"' LIMIT 1"); | |
result = resultSet.field(0); |
import sys | |
from PySide.QtCore import QObject, Slot | |
from PySide.QtGui import QApplication | |
from PySide.QtWebKit import QWebView | |
html = """ | |
<html> | |
<body> | |
<h1>Hello!</h1><br> |
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
<html> | |
<title> | |
SQLite Example | |
</title> | |
<body> | |
<FORM ACTION="/create" METHOD=POST> | |
Name: <input type="text" name="name"> | |
Marks: <input type="text" name="marks"> |
Here are a list of headless browsers that I know about: