This file contains hidden or 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
var ajax_links_selector = 'a.ajax'; | |
var content_selector = '#content'; | |
var first_call = true; | |
var navilevel_substring = 3; // how many chars from pathname are static (3 for languagecode like /de/) | |
/* needs jquery address loaded: http://www.asual.com/jquery/address/ | |
* | |
* needs feincms to be ajax-enabled: | |
* | |
* feincms/views/base.py: |
This file contains hidden or 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
// Inspired by http://stackoverflow.com/questions/5106243/how-do-i-get-background-image-size-in-jquery, a simple jquery plugin who does the task | |
$.fn.getBgImage = function(callback) { | |
var height = 0; | |
var path = $(this).css('background-image').replace('url', '').replace('(', '').replace(')', '').replace('"', '').replace('"', ''); | |
var tempImg = $('<img />'); | |
tempImg.hide(); //hide image | |
tempImg.bind('load', callback); | |
$('body').append(tempImg); // add to DOM before </body> | |
tempImg.attr('src', path); |
This file contains hidden or 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
# imports | |
from django.conf import settings | |
from django.db.models import signals | |
from django.dispatch import receiver | |
from django.test.client import Client | |
# your other imports, config here | |
@receiver(signals.post_save, sender=Page) | |
def error_templates(sender, instance, created, raw, using, **kwargs): |
This file contains hidden or 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
<html> | |
<head> | |
<title>{Title}</title> | |
<link rel="shortcut icon" href="{Favicon}"> | |
<link rel="alternate" type="application/rss+xml" href="http://feeds.feedburner.com/zurheiterenmischung"> | |
<!-- of course, we use the fancy open webfont LaneNarrow. generate your own: http://www.fontsquirrel.com/fontface/generator --> | |
<link rel="stylesheet" type="text/css" href="http://pushkinopen.s3.amazonaws.com/mixblog/media/fonts/stylesheet.css" > | |
<!-- to save a lot of time, we use the blueprint css framework: http://blueprintcss.org/ --> |
This file contains hidden or 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
import os | |
from fabric.api import * | |
from urlparse import urlparse | |
@task | |
def clone(uri, local_name=None): | |
""" |
This file contains hidden or 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
-- Aufgabe 1 | |
\c postgres | |
DROP DATABASE IF EXISTS projects; | |
CREATE DATABASE projects encoding='UTF8'; | |
\c projects | |
-- b) / c) | |
DROP TABLE IF EXISTS Person; | |
CREATE TABLE Person ( |
This file contains hidden or 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
var inputs = document.getElementsByClassName('_2aks'); | |
for(var i=0; i<inputs.length;i++) { | |
inputs[i].click(); | |
} |
This file contains hidden or 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
gulp.task 'sass', -> | |
gulp.src(paths.sass) | |
.pipe sourcemaps.init() | |
.pipe sass | |
includePaths: [ | |
'./node_modules' | |
'./bower_components' | |
] | |
errLogToConsole: true | |
onError: notify.onError('Stylus Error: <%= error.message %>') |
This file contains hidden or 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
// React imports | |
import React from 'react'; | |
const Clock = (props) => { | |
const center = { | |
x: 15, | |
y: 15, | |
}; | |
const lengths = { |
OlderNewer