Skip to content

Instantly share code, notes, and snippets.

@sfelde
sfelde / fabfile.py
Created July 24, 2012 12:08 — forked from gregglind/fabfile.py
Fabfile for PyMNtos September 2011 Meeting
#!/usr/bin/env python
"""
Example fabfile for PyMNtos September 2011 meeting.
some examples of usage:
$ fab -H somehost -- uname -a
$ fab -H somehost run:'uname -a'
$ fab -d example
@sfelde
sfelde / gist:3370200
Created August 16, 2012 13:46
Match HTML Tag Content
/(\<(?:.*?)\>)([^\<]*)/gm
@sfelde
sfelde / demo.html
Created August 20, 2012 12:46 — forked from sergejmueller/demo.html
Fullscreen API Demo. Denkbar für eShops. Lauffähig unter Firefox, Chrome und Safari.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Sergej Müller" />
<link href="style.css" rel="stylesheet" />
<title>Fullscreen Demo</title>
@sfelde
sfelde / launch_sublime_from_terminal.markdown
Created November 11, 2012 19:36 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

class BankAccount < ActiveRecord::Base
# Umsätze von start_date bis end_date abrufen
# * passport_type, passphrase, pin und file kommen in dieser Implementation aus der zugrunde liegenden Tabelle.
# * Wenn passport_type = "PinTan" ist, wird die pin verwendet.
# * Wenn passport_type = "RDHNew" ist, wird die Schlüsseldatei aus filename verwendet und mit der passphrase entschlüsselt.
def get_transactions(start_date, end_date)
HBCIUtils.setParam("client.passport.#{passport_type}.filename", filename)
HBCIUtils.setParam("client.passport.#{passport_type}.init", '1')
@sfelde
sfelde / html5video_converter
Last active December 11, 2015 18:59
convert input video file to html5 video formats mod. from url: http://sandalov.org/blog/1184/
#!/bin/bash
if [[ $1 ]]
then
filename=$(basename "$1")
filename=${filename%.*}
#$(dirname "$1")
directory=result
duration=$(ffmpeg -i "$1" 2>&1 | grep Duration | awk '{print $2}' | tr -d ,)
minutes=${duration%:*}
@sfelde
sfelde / gitignore
Created February 8, 2013 11:57
django gitignore
*.py[co]
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
@sfelde
sfelde / image-optimization
Created February 10, 2013 21:02
image optimization
find . -name '*.jpg' | xargs jpegoptim --strip-all
find . -name '*.png' | xargs optipng
@sfelde
sfelde / uwsgi-start-stop
Created March 1, 2013 19:29
uwsgi kill stop start
service uwsgi stop; killall -9 uwsgi-core; service uwsgi start

Mac で Nginx

インストール

$ brew install nginx

インストールされる場所:

/usr/local/Cellar/nginx/1.2.4/