Skip to content

Instantly share code, notes, and snippets.

@T2BE
T2BE / tmux-cheatsheet.markdown
Last active August 29, 2015 14:26 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@T2BE
T2BE / rss2atom.xslt.xml
Created April 13, 2016 19:23 — forked from dajare/rss2atom.xslt.xml
Convert RSS xml file to Atom format
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="channel">
<xsl:element name="feed" namespace="http://purl.org/atom/ns#" >
<xsl:attribute name="version">0.3</xsl:attribute>
<xsl:element name="title" namespace="http://purl.org/atom/ns#">
<xsl:value-of select="*[local-name()='title']" />
</xsl:element>
@T2BE
T2BE / gist:e18661a5e80ff365b4b67dcf94691a6c
Created May 30, 2016 11:49 — forked from marteinn/gist:5546293
Quick example on how to replace the Flask-Admin homescreen.
from flask.ext.admin import Admin, expose, AdminIndexView
class HomeView(AdminIndexView):
@expose("/")
def index(self):
return self.render('admin/home.html')
admin = Admin(app, "MadeInStockholm.se", index_view=HomeView(name='Home'))
@T2BE
T2BE / autopgsqlbackup
Created June 11, 2016 14:49 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9