Skip to content

Instantly share code, notes, and snippets.

View minichate's full-sized avatar
🥰
Hi Everyone

Christopher Troup minichate

🥰
Hi Everyone
View GitHub Profile
From dbfec0365b3eb8d99a0be3b4b0501f06596bea54 Mon Sep 17 00:00:00 2001
From: Christopher Troup <chris@norex.ca>
Date: Sun, 7 Dec 2008 22:30:32 -0400
Subject: [PATCH] add extra DBColumns
---
core/DBColumns.php | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/core/DBColumns.php b/core/DBColumns.php
From 3a7ea21f6a899b2c67db9f138e6284a37736e0ff Mon Sep 17 00:00:00 2001
From: Christopher Troup <chris@norex.ca>
Date: Fri, 23 Jan 2009 16:31:32 -0500
Subject: [PATCH] fix for content page urls being possibly invalid [fix: 34]
---
modules/Content/include/ContentPage.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/Content/include/ContentPage.php b/modules/Content/include/ContentPage.php
<?php
class AddressEntry extends DBRow {
public function createTable() {
/* Create a model definition and map field types to db column names and labels.
* ex: DBColumn::make('text', 'first_name', 'First Name') means:
* - field is a 'text' field
* - field maps to the column 'first_name' in database
* - field should have the label 'First Name' when being displayed in a form
*/
$cols = array(
public static class MyGridRow extends GridRow<String> {
private Label label = new Label("");
private TextBox innerBox = new TextBox();
private ValidatingWidget<String> textBox = new ValidatingWidget<String>();
private DeleteIconWidget<String> deleteIcon = new DeleteIconWidget<String>();
public MyGridRow() {
textBox.setWidget(innerBox);
textBox.setValidator(new HasValidation<String>() {
@Override
/*
* Long and Dreary.
*/
var json = xml2json.parser(response_text),
query_result = json.envelope.body.queryresponse.result,
users = [];
// Build up a list of {{sd.User}}s to return to the view.
if(query_result.size == 1){
import os
from commands import getoutput
class Blamer(object):
"""
This script will run through all the files git tracks, and see how many
lines each user has written/edited. You will get a number of lines and
percentage. Throughout the course of a project, you will add lines and your
lines will be deleted. This shows you how much of your code is still in the
project now.
@minichate
minichate / coffee.json
Created June 17, 2011 14:07
Timmys Run
{
"Christopher Troup": {
"1x": "Large Double-Double",
"1x": "24 Timbits"
}
}
@minichate
minichate / coffee.json
Created June 17, 2011 14:18 — forked from thurloat/coffee.json
Timmys Run
{
"Christopher Troup": [
{
item: "Coffee",
modifiers: [
cream: 2,
sugar: 2
],
amount: 1
},
@minichate
minichate / gist:1040106
Created June 22, 2011 13:43
GetSatisfaction Feed Sample 1
{
"data": [
{
"at_sfn": "http://getsatisfaction.com/sheepdoginc/topics/weve_moved-1io2po",
"author": {
"at_sfn": "http://getsatisfaction.com/people/john_2286285",
"avatar": "http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_medium.jpg",
"avatar_url_large": "http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_large.jpg",
"avatar_url_medium": "http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_medium.jpg",
"avatar_url_mini": "http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_mini.jpg",
@minichate
minichate / gist:1040193
Created June 22, 2011 14:24
Get Satisfaction with Callback
gsUpdate({"data":[{"me_too_count":1,"status":"complete","employee":true,"follower_count":1,"style":"update","reply_count":0,"slug":"weve_moved-1io2po","last_active_at":"2011/06/16 14:52:20 +0000","champion":false,"has_promoted_replies":false,"at_sfn":"http://getsatisfaction.com/sheepdoginc/topics/weve_moved-1io2po","created_at":"2011/06/16 14:52:20 +0000","most_recent_activity":"create","subject":"We've Moved!","emotitag":{"feeling":"excited","face":"happy","intensity":1},"company_id":81150,"author":{"avatar_url_large":"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_large.jpg","employee":true,"avatar_url_small":"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_small.jpg","avatar_url_medium":"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_medium.jpg","avatar_url_mini":"http://s3.amazonaws.com/satisfaction-production/public/uploaded_images/7552101/sprinkles_mini.jpg","champion":false,"at_s