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
<a href="#" data-load-css="wtf.css" data-load-fn="wtfFn">Some module link</a> | |
<form action=""> | |
<button data-load-css="wtf2.css" data-load-fn="wtf2Fn">Yeah buddy</button> | |
</form> | |
var moduleFuncs = { | |
wtfFn: function() {}, | |
wtf2Fn: function() {} | |
}; |
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
var τ = Math.PI * 2; | |
var Θ = 30; | |
var λ = function(){}; | |
var ψ = ['z^0', 'z^1', '...']; | |
var Δ = function(thing1, thing2){return Math.abs(thing1-thing2);}; | |
alert(Θ); | |
alert(τ); | |
alert(λ); | |
alert(ψ); |
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
// MIT LICENSE - use for whatever! | |
@mixin transition($property, $time, $easing) { | |
-moz-transition: $property $time $easing; | |
-webkit-transition: $property $time $easing; | |
-o-transition: $property $time $easing; | |
transition: $property $time $easing; | |
} | |
@mixin column-count($gap, $count) { |
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
// Python style | |
function Class() { | |
var self = this; | |
this.__init__ = function(x, y){ | |
self.x = x; | |
self.y = y; | |
}; | |
this.__str__ = function(){ | |
log('<' + self.x + self.y + '>'); |
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
def clean_data(self): | |
filetype = self.cleaned_data['data'].content_type | |
if not filetype == 'application/pdf': | |
raise forms.ValidationError( | |
'"{}" is not a valid file. Please upload a valid .PDF.') | |
else: | |
return self.cleaned_data['data'] |
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
var d3 = function(){ | |
var self = this; | |
this.foo = function() { | |
return this; | |
}; | |
this.range = function(max) { | |
var x = []; | |
for(var i = 0 ; i < max; i++) { | |
x.push(i); | |
} |
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
/* Bootstrap overrides */ | |
.bg-primary, | |
.bg-success, | |
.bg-info, | |
.bg-warning, | |
.bg-danger { | |
padding: 1em; | |
} |
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
class ... | |
class Meta: | |
_textarea = forms.Textarea(attrs={'cols': 40, 'rows': 5}) | |
model = models.MyModel | |
widgets = { | |
'field1': _textarea, | |
'field2': _textarea, | |
'field3': _textarea, | |
'field4': _textarea, | |
} |
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 pyquery import PyQuery as pq | |
import json | |
base_url = 'http://www.logolounge.com/article/' | |
years = ['2003trends', '2004trends', '2005trends', '2006trends', | |
'2007trends', '2008trends', 'minortrendanimotion', | |
'2009trends', '2010trends', '2011trends', | |
'2012logotrends', '2013logotrends', '2014logotrends'] |
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 @hack to specify all selectors that should be removed at a later point in time! | |
// @hack | |
#shitty-overqualified-id { | |
font-size: 12.em; | |
} | |
// @hack | |
#another-overqualified-id { | |
padding: 1.3m; | |
} |
OlderNewer