Skip to content

Instantly share code, notes, and snippets.

@jamiely
jamiely / request.json
Created August 4, 2011 14:35
Intermap - API Issue 20110804 - Duplicate Share
{"newUserEmail":"jatuttle@**","id":1}
@jamiely
jamiely / Charles Overview
Created August 4, 2011 17:57
Intermap - API Issue 20110804 - Duplicate Share 2
URL http://localhost/intermap/store/index.cfm/api/v1/projects/1/share
Status Complete
Response Code 500 Internal Server Error
Protocol HTTP/1.1
Method POST
Content-Type application/json
Client Address /127.0.0.1
Remote Address localhost/127.0.0.1
Timing
Request Start Time 8/4/11 1:55:18 PM
@jamiely
jamiely / request.json
Created August 4, 2011 20:14
Intermap - API Issue 20110804 - Project Share
{"newUserEmail":"[email protected]","id":3}
@jamiely
jamiely / InformationCentrality.java
Created August 7, 2011 04:57
Information Centrality Algorithms
//http://code.google.com/p/mason/source/browse/trunk/contrib/socialnets/sim/field/network/stats/actorcentrality/InformationCentrality.java?r=355
/*
Copyright 2010 by Sean Luke and George Mason University
Licensed under the Academic Free License version 3.0
See the file "LICENSE" for more information
*/
package sim.field.network.stats.actorcentrality;
import sim.field.network.stats.*;
import sim.field.network.*;
@jamiely
jamiely / Projects.cfc
Created August 10, 2011 19:42
Intermap - API Issue 20110810 - Deleting Projects
public function startDelete(struct rc){
//deleting of projects not yet allowed
//throw(type="API", errorCode="403");
//before deleting the project, remove it from all assigned users
local.p = entityLoadByPK("project",rc.id);
for (local.u in local.p.getUsers()){
local.u.removeProject(local.p);
}
ormFlush();
@jamiely
jamiely / TestTerms.cfc
Created August 12, 2011 01:11
Intermap - API Issue 20110811 - Non-cascading delete
<cffunction name="DELETE_term_cascades_to_interactions">
<!--- delete termB instead of termA --->
<cfset local.result = apiCall("DELETE", "/terms/2") />
<cfset debug(local.result) />
<cfset assertEquals("200 OK", local.result.statuscode, "Was not able to delete") />
<cfset local.result = apiCall("GET", "/interactions/1") />
<cfset debug(local.result) />
<cfset assertEquals("404 Not Found", local.result.statuscode, "Delete was not successful") />
<cfset local.result = apiCall("GET", "/interactions/3") />
<cfset debug(local.result) />
@jamiely
jamiely / intermap.20110919.diff
Created September 19, 2011 12:46
Diff of final changes for intermap
--- a/css/global.css
+++ b/css/global.css
@@ -300,6 +300,10 @@ ul#menu-main-menu li a {
#matrix #interactionMatrixParent {
padding-top: 10px;
}
+ #matrix #interactionMatrixParent h2 .button {
+ font-size: x-small;
+ float: right;
+ }
@jamiely
jamiely / intermap.diff
Created September 27, 2011 14:59
intermap.diff
diff --git a/js/intermap/models/Interaction.js b/js/intermap/models/Interaction.js
index 5b74c7b..c10c4e0 100644
--- a/js/intermap/models/Interaction.js
+++ b/js/intermap/models/Interaction.js
@@ -7,7 +7,7 @@ var Interaction = Backbone.Model.extend({
comment: ''
},
initialize: function(args) {
- _.bindAll(this, 'hasTerm');
+ _.bindAll(this, 'hasTerm', 'destroy');
@jamiely
jamiely / auth.diff
Created October 7, 2011 19:04
Auth using sorcery gem
diff --git a/.gitignore b/.gitignore
index 2831ed6..70cd85f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ tmp/**/*
config/database.yml
.rvmrc
.DS_Store
+mysql2
\ No newline at end of file
@jamiely
jamiely / FilterComments.vba
Created October 13, 2011 17:20
VBA Shizzle
Sub SeparateCommentsFromActiveSheet()
SeparateComments (ActiveSheet.Name)
End Sub
Sub SeparateComments(sheetToExamineName As String)
Set sheetToExamine = ActiveWorkbook.Sheets(sheetToExamineName)
Dim startingCell As Range
Dim examineCells As Range
Dim cell As Range