Skip to content

Instantly share code, notes, and snippets.

printf '%s\n' $@ | sort -u
@carylee
carylee / contact.json
Created July 7, 2015 19:59
Hubspot Contact API Questions
{
"addedAt": 1405347851360,
"vid": 154835,
"canonical-vid": 154835,
"merged-vids": [],
"portal-id": 62515,
"is-contact": true,
"profile-token": "AO_T-mPlyZmoCpqTNHTwZq_pcAEjmt8FIoJO67osiz9pMRNtyZ0wLvXMHgDbUKsMmIvuHnHYoaQNnwcsUgWnSvtLCBI4VNKpIfaRzaoMXnN3WB0YyBRHIdhwf3taqZq5R2gCf6_dK0lb",
"profile-url": "https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPlyZmoCpqTNHTwZq_pcAEjmt8FIoJO67osiz9pMRNtyZ0wLvXMHgDbUKsMmIvuHnHYoaQNnwcsUgWnSvtLCBI4VNKpIfaRzaoMXnN3WB0YyBRHIdhwf3taqZq5R2gCf6_dK0lb/",
"properties": {
We couldn’t find that file to show.
package de.tum.ws2009.grprog.uebungsblatt01;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class SalaryCalculator {
/**
* This method computes the salary after tax per month.
@carylee
carylee / get_alternate_language_link.php
Created January 28, 2010 20:48
A function and subfunctions to find links to the same content on two different sites (of different languages) - for use on myoncofertility.org
@carylee
carylee / gist:963476
Created May 9, 2011 21:40
Output from locations/3
{"location":
{"name":"Arch",
"id":"3"},
"stops":[
{"time":"16:41:00",
"route":
{"name":"Intercampus Northbound",
"id":8}},
{"time":"16:51:00",
"route":
@carylee
carylee / gist:963485
Created May 9, 2011 21:45
Output from /all
[
{"location":
{"name":"Arch",
"id":3},
"stops":[
{"time":"16:41:00",
"route":
{"name":"Intercampus Northbound",
"id":8}},
{"time":"16:51:00",
@carylee
carylee / gist:1271012
Created October 7, 2011 18:26
Webform responses query
SELECT all1.nid as nid, all1.email as email, all1.submitted as submitted, all1.node_uid as node_uid, all2.form_key as answer_type,
all2.name as question, all2.response_uid as response_uid
FROM
(SELECT rest.nid, rest.response, rest.email, rest.sid, rest.submitted, rest.response_uid, rest.node_uid, form_key, name, type
FROM (SELECT wsd1.nid as nid,
wsd1.data as response, wsd2.data as email, wsd1.sid as sid, ws.submitted, ws.uid as response_uid, node.uid as node_uid
FROM webform_submitted_data wsd1
JOIN webform_submitted_data wsd2 ON wsd1.sid=wsd2.sid
JOIN webform_submissions ws ON wsd1.sid=ws.sid
JOIN node ON node.nid=wsd1.nid
@carylee
carylee / gist:1271386
Created October 7, 2011 21:26
http://localhost/api/webform/1316/report/yesno.yaml
---
total: 4
yes:
count: 2
percentage: 50
responses:
-
email: carylee@gmail.com
time: 1317330924
-
@carylee
carylee / gist:1282889
Created October 12, 2011 22:54
Sample output of api/webform/$NID/fullreport.json
{
"cumulative_report" : {
"question" : "How much do you like reporting?",
"answers" : {
"3" : {
"responders" : [
{
"time" : "1318453303",
"email" : "foobar@bar.com"
},