Skip to content

Instantly share code, notes, and snippets.

package com.example.bank.impl;
import akka.Done;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.function.Consumer;
import java.util.function.Function;
import org.slf4j.Logger;
/*! * Snowplow - The world's most powerful web analytics platform
*
* @description JavaScript tracker for Snowplow
* @version 2.8.2
* @author Alex Dean, Simon Andersson, Anthon Pang, Fred Blundun, Joshua Beemster
* @copyright Anthon Pang, Snowplow Analytics Ltd
* @license Simplified BSD
*/
/*
-- define reference categories and suitable listing ages
-- IRL would be a static table
drop table if exists #category;
select
location_level_0_id
,location_level_1_id
,housing_type_id
,offering_type_id
@acgray
acgray / doc.html
Last active January 10, 2017 11:40
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Property Finder Data API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8" />
http = require('http');
module['exports'] = function echoHttp (hook) {
var options = {
hostname: 'www.telize.com',
port: 80,
path: '/geoip/'+hook.params.ip,
method: 'GET'
}
#top-panel {
background: #bbb;
}
#jenkins-home-icon {
display: none;
}
#main-table {
background: none !important;
}
<!doctype html>
<html>
<head>
<title>My Facebook App</title>
<style type="text/css">
h1 { font-weight: bold; }
.another-style { font-size: 2em; }
/* etc etc more styles */
class ApplicationWizard(SessionWizard):
def done(self, request):
return render_to_response('done.html', {
'form_data': [form.cleaned_data for form in form_list],
})
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.db import models
from filebrowser.fields import FileBrowseField
from mptt.forms import TreeNodeChoiceField, TreeNodeMultipleChoiceField
from mptt.models import MPTTModel, TreeForeignKey
from taggit.managers import TaggableManager
from ckeditor.fields import RichTextField
class Section(MPTTModel):
@acgray
acgray / admin.py
Created September 20, 2011 10:41
Admin form inheritance
from django import forms
from django.contrib import admin
from fieldlevel.admin import FieldLevelAdmin
from mptt.admin import MPTTModelAdmin
from content.models import Article, Section, Review
class ArticleForm(forms.ModelForm):
model = Article
class Media:
js = (