Skip to content

Instantly share code, notes, and snippets.

View mtheoryx's full-sized avatar
🐳
Making happy little clouds

David Poindexter mtheoryx

🐳
Making happy little clouds
View GitHub Profile
@mtheoryx
mtheoryx / gist:3209139
Created July 30, 2012 18:53
crazy tomcat shell function
# Tomcat
function tomcat () {
# starting or stopping?
case "$1" in
"start")
#what sakai.properties file for chosen db?
case "$2" in
"local")
cd /opt/props && git checkout 'local'
echo "using MySQL-configured branch"
@mtheoryx
mtheoryx / gist:3217423
Created July 31, 2012 14:30
Quick FAQ toggle
$(document).ready(function(){
$("div.answer").hide();
$("div#faq div.answer").first().show();
$("div#faq h4").click(function(){
$(this).next().toggle();
});
});
@mtheoryx
mtheoryx / gist:3286362
Created August 7, 2012 15:26
Set Microsoft Lync status with applescript
--go away
tell application "Microsoft Lync"
activate
end tell
tell application "System Events"
tell process "Microsoft Lync"
tell menu bar 1
tell menu bar item "Status"
tell menu "Status"
2012-09-25 15:22:00,627 [main] INFO org.sakaiproject.chat2.model.impl.ChatContentProducer - destroy()
2012-09-25 15:22:00,628 [main] INFO org.sakaiproject.chat2.model.impl.ChatEntityProducer - destroy()
2012-09-25 15:22:00,628 [main] INFO org.sakaiproject.chat2.model.impl.ChatDataMigration - destroy()
2012-09-25 15:22:00,629 [main] INFO org.sakaiproject.calendar.impl.BaseExternalCalendarSubscriptionService - destroy()
2012-09-25 15:22:00,634 [main] INFO org.sakaiproject.calendar.impl.GenericCalendarImporter - destroy()
2012-09-25 15:22:00,638 [main] INFO org.sakaiproject.email.impl.BasicEmailService - destroy()
2012-09-25 15:22:00,639 [main] INFO org.sakaiproject.assignment.impl.AssignmentSupplementItemServiceImpl - destroy()
2012-09-25 15:22:00,639 [main] INFO org.theospi.portfolio.wizard.taggable.impl.WizardReferenceEntityProducer - destroy()
2012-09-25 15:22:00,639 [main] INFO org.theospi.portfolio.wizard.impl.WizardPageDefinitionEntityProducer - destroy()
2012-09-25 15:22:00,651 [main] WARN org.
@mtheoryx
mtheoryx / gist:3789897
Created September 26, 2012 19:03
ST2 Font Settings
"font_face": "Source Sans Pro Regular",
"font_options":["no_round"],
"font_size": 15.0,
select srr.ROLE_NAME from onc.SAKAI_REALM_ROLE srr where srr.ROLE_KEY in
(select srrf.ROLE_KEY from onc.SAKAI_REALM_RL_FN srrf
WHERE
( srrf.FUNCTION_KEY=(select srf.FUNCTION_KEY from onc.SAKAI_REALM_FUNCTION srf where srf.FUNCTION_NAME='roster.viewprofile')
AND srrf.REALM_KEY=(select sr.REALM_KEY from onc.SAKAI_REALM sr where sr.REALM_ID='!site.template.portfolio')
))
@mtheoryx
mtheoryx / gist:3940978
Created October 23, 2012 19:17
Yes, I did this :|
function FCKeditor_OnComplete( editorInstance )
{
var oEditor = editorInstance;
var startupValue = oEditor.StartupValue;
var innerHtml = oEditor.EditorDocument.body.innerHTML;
if ( ( /^<br><br>/im.test( innerHtml ) ) && ( /<div>(.*)<\/div>$/im.test( innerHtml )) )
{
//fix the formatting
var innerHtmlJQObj = $( oEditor.EditorDocument.body );
@mtheoryx
mtheoryx / gist:3947141
Created October 24, 2012 16:28
default tool backfill
CREATE TABLE onc.TOOL_TMP (
PAGE_ID VARCHAR (99),
SITE_ID VARCHAR (99)
);
CREATE TABLE onc.TOOL_TMP2 (
PAGE_ID VARCHAR (99),
SITE_ID VARCHAR (99),
TITLE VARCHAR (99),
LAYOUT CHAR (1),
SELECT
REPLACE (
DUMP (
dbms_lob. SUBSTR (BINARY_ENTITY),
1017
),
','
)
FROM
content_resource
@mtheoryx
mtheoryx / gist:4068477
Created November 13, 2012 21:21
Lessonbuilder POM
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sakaiproject</groupId>
<artifactId>master</artifactId>
<version>2.7.1-ONCOURSE</version>
<relativePath>../master/pom.xml</relativePath>
<!-- <version>2.8.1</version> --> <!-- purepom deployed with sakai-2.8.0 -->