Skip to content

Instantly share code, notes, and snippets.

@acoomans
acoomans / git.md
Last active September 3, 2015 16:30
Git cheat sheet

Git

Author fix

rebase, mark the commit as 'edit'

amend:

git commit --amend --reset-author
@paulschreiber
paulschreiber / tail
Created August 22, 2014 17:45
syslog tailing
tail -f /var/log/syslog | sed 's/#012/\n\t/g'
@jab
jab / index.html
Created August 22, 2014 17:27
meta refresh
<html>
<head>
<meta http-equiv="refresh" content="0;URL='http://www.example.com/'">
</head>
<body>
<p>Redirecting to <a href="http://www.example.com/">
www.example.com</a>...</p>
</body>
</html>
@cron64
cron64 / CSS: Style OL
Created August 22, 2014 17:09
CSS: Style OL
.tipItem ol
{
counter-reset:li; /* Initiate a counter */
margin-left:0; /* Remove the default left margin */
padding-left:0; /* Remove the default left padding */
}
.tipItem ol li
{
position:relative; /* Create a positioning context */
margin:0 0 6px 2em; /* Give each list item a left margin to make room for the numbers */
@techniq
techniq / audit_mixin.py
Created March 16, 2013 01:05
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)