Skip to content

Instantly share code, notes, and snippets.

@halit
halit / sparks.py
Created December 2, 2012 00:41 — forked from stefanv/sparks.py
Command line sparks in Python
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <[email protected]>
"""
USAGE:
@halit
halit / mkpdf
Created November 4, 2012 19:24 — forked from ecylmz/mkpdf
#!/bin/bash
# markdown ile yazılan dosyalardan pdf üret.
# Örnek: <betik> ~/examples.md
PATH=/var/lib/gems/1.8/bin:$PATH
[ $# -gt 0 ] || {
echo >&2 "Kullanım: $0 < markdown dosyası>"
echo >&2 "Örnek: $0 ~/examples.md"
@halit
halit / sublime2-python-django.md
Created September 21, 2012 19:42 — forked from vigo/sublime2-python-django.md
Sublime Text 2, Python + Django ve Virtualenv ile otomatik tamamlama + PEP kontrolü

Sublime Text 2, Python + Django ve Virtualenv ile otomatik tamamlama + PEP kontrolü

Gerekenler

  1. [Sublime Text 2][1]
  2. [Sublime Paket Yöneticisi][2]

Kurulum

Zaten python, virtualenv vs gibi şeylerin kurulu olduğunu varsayıyorum.

@halit
halit / __init__.py
Created September 18, 2012 21:10 — forked from fatiherikli/__init__.py
decorator examples
def accepts(*accepted_types):
def decorated_function(function):
def inner(*passed_args):
for accepted_type, passed_arg in zip(accepted_types, passed_args):
if not isinstance(passed_arg, accepted_type):
raise TypeError
return function(*passed_args)
return inner
return decorated_function