This file contains 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
<html> | |
<head> | |
<style> | |
h1 {text:bold;} | |
#myid {color: green;} | |
footer p {color: red; text: bold;} | |
</style> | |
</head> | |
This file contains 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
<!-- BASIC JOUERY EVENT DEMO2 --> | |
<html> | |
<meta http-equiv="Content-Type" content="text/html"; charset="UTF-8" /> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<!--<script src="http://code.jquery.com/jquery-latest.js"></script> --> | |
This file contains 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
!!! 5 | |
html(lang='en') | |
head | |
meta(charset='utf-8') | |
title My Name | |
//if lt IE 9 | |
script(src='http://html5shim.googlecode.com/svn/trunk/html5.js') | |
link(href='/static/landing/img/shyguy.ico', rel='shortcut icon') | |
link(href='/static/landing/css/bootstrap.min.css', rel='stylesheet') | |
link(href='/static/landing/css/custom-resume.css', rel='stylesheet') |
This file contains 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
""" | |
Requirements: | |
XlsxWriter==0.5.2 | |
beautifulsoup4==4.3.2 | |
requests==2.2.1 | |
""" | |
from xlsxwriter.workbook import Workbook | |
from bs4 import BeautifulSoup |
This file contains 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
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf | |
change: |
This file contains 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
# http://stackoverflow.com/questions/14249115/serializing-output-to-json-valueerror-circular-reference-detected | |
from sqlalchemy import * | |
from sqlalchemy.orm import sessionmaker, scoped_session | |
from sqlalchemy.sql import text | |
def f(): | |
print 'hello' | |
engine = create_engine('mysql://readonly:[email protected]:3306/efn') | |
Session = scoped_session(sessionmaker(bind=engine)) |
This file contains 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | |
<title>Document</title> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css"> |
This file contains 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
""" | |
http://datatables.net/forums/discussion/13679/working-code-for-server-side-paging-filtering-sorting-for-python-flask-mongodb | |
I wrote a python script for implementing server-side DataTables using python, flask, and mongodb. It works very well for me, so I thought I'd share the code for anyone that needs it. Below is the script generalized as a template for you guys. | |
by luv_tables | |
January 2013 | |
""" | |
from collections import namedtuple | |
from pymongo import MongoClient |
This file contains 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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |