Skip to content

Instantly share code, notes, and snippets.

View hanleybrand's full-sized avatar

Peter Hanley hanleybrand

View GitHub Profile
@hanleybrand
hanleybrand / worldgen_crash_excerpt1.log
Created March 1, 2016 17:16
LITW worldgen crashes
[21:58:10] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
[21:58:10] [Server thread/INFO]: Generating keypair
[21:58:10] [Server thread/INFO]: Converting map!
[21:58:10] [Server thread/INFO]: Scanning folders...
[21:58:10] [Server thread/INFO]: Total conversion count is 0
[21:58:11] [Server thread/INFO]: Preparing start region for level 0
[21:58:12] [Server thread/INFO]: Preparing spawn area: 4%
[21:58:13] [Server thread/INFO]: Preparing spawn area: 6%
[21:58:14] [Server thread/INFO]: Preparing spawn area: 11%
[21:58:15] [Server thread/INFO]: Preparing spawn area: 17%
@hanleybrand
hanleybrand / get_student_enrollment_from_user_courses.sql
Created December 22, 2015 16:27
Blackboard SQL query (bb_bb60 schema) for SQL SERVER (t-sql) -- retrieve enrollments in courses where @USER_ID (username) is an instructor
use bb_bb60
declare @USER_ID varchar(8);
set @USER_ID= 'username'
SELECT
distinct cm.COURSE_NAME
, COUNT(cu.USERS_PK1) OVER (PARTITION BY cu.CRSMAIN_PK1) AS Num_students
FROM COURSE_USERS cu
@hanleybrand
hanleybrand / webex_monthly_stats.sql
Created November 23, 2015 21:30
Don't forget to change the date (@enddate should be the day after the range you want to count)
use WebEx
declare @startdate datetime;
declare @enddate datetime;
set @startdate = '10/1/2015'
set @enddate = '11/1/2015'
--- [TotalAttendee] > 1 (i.e. not someone seeing loggin in to an empty/unstarted meeting)
@hanleybrand
hanleybrand / etc_hosts
Last active November 4, 2015 18:53
example /etc/hosts file for disabling macsecurityservice.info
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
@hanleybrand
hanleybrand / storage_admin.py
Created September 29, 2015 13:21
Some fixes for MDID3's storage/admin page
from django.contrib import admin
from models import Storage, Media, ProxyUrl, TrustedSubnet
class StorageAdmin(admin.ModelAdmin):
list_display = ('title', 'name', 'system', 'base', 'urlbase')
# http://stackoverflow.com/questions/9563935/removing-buttons-links-in-django-admin
def get_actions(self, request):
(function(angular){
'use strict';
var myModule = angular.module('myModule', []);
/**
* This provider adds SOAP support to the $http service
* @class soap-interceptorProvider
* @module myModule
* @namespace myModule
@hanleybrand
hanleybrand / index.html
Last active August 29, 2015 14:26
blocks.org test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
@hanleybrand
hanleybrand / 001_shell_out.sh
Last active August 29, 2015 14:21
When I do the gist-logs command I get a message "couldn't understand kern.osversion `14.3.0' -- which from googling might be a gcc problem?
$ brew gist-logs smpeg
couldn't understand kern.osversion `14.3.0'
https://gist.github.com/a658ad39f8e13b43054b
$ which autom4te
/usr/local/bin/autom4te
$ brew upgrade autom4te
Error: No available formula for autom4te
$ /usr/bin/gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
@hanleybrand
hanleybrand / crewmate.json
Last active March 24, 2024 16:06
Your Starbound Crew: How to fix the first crew member spawner - probably is the same for every one.
{
"type" : "crewmate",
"disableWornArmor" : true,
"scripts" : [
"/npcs/main.lua",
"/scripts/pathing.lua",
"/npcs/timers.lua",
"/scripts/sensors.lua",
@hanleybrand
hanleybrand / get_questions_of_type_and_their_answers_from_assessment.sql
Last active August 29, 2015 14:19
Get questions of a specific question type (e.g. multiple choice) from a specific test in Blackboard Learn (bb_bb60) using the url to get the assessment pk1.
use bb_bb60
declare @test_pk int
-- get the test_pk1 from the &content_id fragment of the url of the test in question, e.g.
-- ~/webapps/assessment/take/launchAssessment.jsp?course_id=_1111_1&content_id=_7777777_1&mode=cpview
set @test_pk = 7777777
declare @question_type int
-- Choose the type of of question and answers that you wish to examine:
-- 1=Multiple Choice, 2=True/False, 3=Multiple Anser, 4=Ordering, 5=Matching, 6=Fill In the Blank,