This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function () { | |
(function () { | |
jQuery('.customized-select').each(function () { | |
var wrapElement = jQuery('<span class="select-customized-container processed" />'); | |
jQuery(this).wrap(wrapElement).wrap(jQuery('<span class="select-customized processed">')); | |
}); | |
})(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="pl"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Borders</title> | |
<style> | |
ul {display: inline-block; } | |
li {float: left; display: inline-block; margin-right: 3px; border-top: 4px solid #f00} | |
li>span {padding: 0 4px 4px; border-right: 1px solid #00f; border-left: 1px solid #00f} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var koView = ko.views.manager.currentView.scimoz; | |
var currentPos = koView.currentPos; | |
try { | |
// Group operations into a single undo | |
koView.beginUndoAction(); | |
// http://www.bennadel.com/blog/142-ask-ben-javascript-string-replace-method.htm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var koView = ko.views.manager.currentView.scimoz; | |
var currentPos = koView.currentPos; | |
try { | |
// Group operations into a single undo | |
koView.beginUndoAction(); | |
// http://www.bennadel.com/blog/142-ask-ben-javascript-string-replace-method.htm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forms.py | |
# -*- coding: utf-8 -*- | |
from django import forms | |
from volontulo.models import UserProfile | |
class RegistrationForm(forms.ModelForm): | |
email = forms.CharField(max_length=254) | |
password = forms.CharField(widget=forms.PasswordInput()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.db import models | |
class UserProfile(models.Model): | |
user = models.OneToOneField(User) | |
is_organization = models.BooleanField() | |
is_administrator = models.BooleanField() | |
def save(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.db import models | |
class UserProfile(models.Model): | |
user = models.OneToOneField(User) | |
is_organization = models.BooleanField() | |
is_administrator = models.BooleanField() | |
def save(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
user = UserProfile.objects.get(user__email=request.POST.get('email')) | |
except User.DoesNotExist: | |
user = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
br = branch -v | |
co = checkout | |
df = diff | |
lg = log -p | |
up = pull | |
who = shortlog -s -- | |
diff = diff --no-prefix |
OlderNewer