Skip to content

Instantly share code, notes, and snippets.

@pebreo
pebreo / basic-css.html
Last active December 30, 2015 10:59
Very basic CSS
<html>
<head>
<style>
h1 {text:bold;}
#myid {color: green;}
footer p {color: red; text: bold;}
</style>
</head>
@pebreo
pebreo / jquery-events-demo.html
Created December 15, 2013 04:28
jQuery Events Demo
<!-- 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> -->
@pebreo
pebreo / homepage-projects.jade
Created December 29, 2013 20:27
Homepage My Projects Bootstrap 2
!!! 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')
@pebreo
pebreo / alltagsdemo.jade
Created December 29, 2013 20:29
All HTML/Jade tags demo
html
head
meta(charset='utf-8')
style(type='text/css')
h1 {color: red;}
link(rel='stylesheet', type='text/css', href='styles.css')
script(src='')
script(type='text/javascript')
body
h1 Headers
@pebreo
pebreo / foo.py
Created January 26, 2014 03:45
temporary file for requests+xlswriter
"""
Requirements:
XlsxWriter==0.5.2
beautifulsoup4==4.3.2
requests==2.2.1
"""
from xlsxwriter.workbook import Workbook
from bs4 import BeautifulSoup
@pebreo
pebreo / mysql.txt
Last active August 29, 2015 14:01 — forked from johnantoni/mysql.txt
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:
# 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:password@192.168.27.183:3306/efn')
Session = scoped_session(sessionmaker(bind=engine))
@pebreo
pebreo / index.html
Last active August 29, 2015 14:02
Bootstrap skeleton
<!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">
@pebreo
pebreo / datatables.py
Created June 23, 2014 02:10
Flask+MongoDB+DataTables
"""
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
---
# ^^^ 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.