Skip to content

Instantly share code, notes, and snippets.

View stibi's full-sized avatar

Martin Stiborský stibi

  • Ostrava, Czech Republic
  • X @stibi
View GitHub Profile
{
"data": [
{
"id": "201628346516017_262813367064181",
"from": {
"name": "Rastislav Turek",
"id": "1301529800"
},
"to": {
"data": [
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a
* copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
@stibi
stibi / PKGBUILD
Created December 13, 2011 22:35
PyCharm PKGBUILD
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
# Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
pkgname=pycharm
pkgver=2.0
pkgrel=1
pkgdesc="Powerful Python and Django IDE. 30-day free trial."
arch=('i686' 'x86_64')
url="http://www.jetbrains.com/pycharm/"
license=('custom')
# virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
export WORKON_HOME=~/virtualenvs
source /usr/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
export M2_HOME=/opt/maven/
export M2=$M2_HOME/bin
source /etc/profile
@stibi
stibi / gist:2469481
Created April 23, 2012 08:18
Python format
>>> data = {"woot": "ale no tak"}
>>> "Fap.. {woot}".format(**data)
'Fap.. ale no tak'
@stibi
stibi / gist:2630438
Created May 7, 2012 21:07
magical decorator
class Test(object):
def decorator(bar=True):
def magic(foo):
def magic2(self):
if bar:
print "Hey, bar is here"
print "start magic"
foo(self)
self.try_me()
print "end magic"
@stibi
stibi / gist:2795773
Created May 27, 2012 01:02
form serialization
$("#groups .permissionsBlock").children().each(function(i, group) {
data["groups"][i] = {"groupName" : $(group).attr("id"), "members" : []};
$(this).children("select").children().each(function(x, user) {
data["groups"][i]["members"][x] = user.text;
});
});
@stibi
stibi / about.md
Created August 30, 2012 10:26 — forked from honzajavorek/about.md
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of the gist from this blog post.

@stibi
stibi / gist:3526279
Created August 30, 2012 10:56
A nice thing I've found in "definition of done" specification of one project
We do not set any strict guidelines what is some level.
It is the level that one can look back his/her own work with pride and therefore it is only known by the individual.
@stibi
stibi / Chelp.py
Created October 2, 2012 18:58
A small Sublime Text 2 plugin for C/C++ developers. It opens for you a header file for the current file and vice versa.
import os
import sublime_plugin
class ChelpCommand(sublime_plugin.WindowCommand):
ALLOWED_EXT = (".c", ".h")
def swap_extension(self, current_extension):
if current_extension == ".c":