Skip to content

Instantly share code, notes, and snippets.

View neurotech's full-sized avatar
🐍
Learning Python ✨

Tim Douglas neurotech

🐍
Learning Python ✨
View GitHub Profile
@neurotech
neurotech / shadow.scss
Created February 23, 2013 11:13
SASS Shadow
@mixin fuzzy-shadow($horiz : 0px , $vert : 2px , $blur : 5px , $spread : 0px , $color : #000000 , $opacity : 0.4) {
-webkit-box-shadow: $horiz $vert $blur $spread rgba($color, $opacity);
-moz-box-shadow: $horiz $vert $blur $spread rgba($color, $opacity);
box-shadow: $horiz $vert $blur $spread rgba($color, $opacity);
}
@neurotech
neurotech / unverified-absences-by-form.sql
Created February 28, 2013 05:24
Troubleshooting some SQL
WITH student_tutor_class AS
(
SELECT
view_student_class_enrolment.student_id,
view_student_class_enrolment.class_id,
view_student_class_enrolment.class,
contact.contact_id,
contact.firstname,
contact.surname,
ROW_NUMBER() OVER (PARTITION BY view_student_class_enrolment.student_id ORDER BY class_teacher.is_primary DESC, view_student_class_enrolment.start_date DESC)
require "viddl-rb"
ViddlRb.io = $stdout
Shoes.app :title => 'Viddl', :width => 300, :height => 150, :margin => 10, :resizable => false do
stack do
para "Enter Video URL:"
edit_line do |e|
@neurotech
neurotech / ruby-conf
Last active December 14, 2015 16:29
A list of all videos for RubyConf Australia 2013 for pasting into jDownloader. Scraped from https://vimeo.com/rubyau
https://vimeo.com/61342270
https://vimeo.com/61342269
https://vimeo.com/61342268
https://vimeo.com/61342267
https://vimeo.com/61255738
https://vimeo.com/61255737
https://vimeo.com/61255734
https://vimeo.com/61255731
https://vimeo.com/61255649
https://vimeo.com/61255648
@neurotech
neurotech / student_status_id.sql
Last active December 15, 2015 02:59
For pulling student status in a readable format.
CASE STUDENT_STATUS_ID
WHEN 1 THEN 'Application Cancelled'
WHEN 2 THEN 'Alumni'
WHEN 3 THEN 'Past Enrolment'
WHEN 4 THEN 'Returning Enrolment'
WHEN 5 THEN 'Current Enrolment'
WHEN 6 THEN 'Place Accepted'
WHEN 7 THEN 'Offered Place'
WHEN 8 THEN 'Interview Pending'
WHEN 9 THEN 'Wait Listed'
@neurotech
neurotech / priority_level.sql
Created March 19, 2013 00:39
For pulling student priority in a readable format.
CASE PRIORITY.PRIORITY_LEVEL
WHEN 0 THEN '0000 - Partial Acceptance'
WHEN 1 THEN '0001 - Current Families'
WHEN 2 THEN '0002 - Italian Bilingual School'
WHEN 3 THEN '0003 - Ex-Student'
WHEN 4 THEN '0004 - Catholic Student & School'
WHEN 5 THEN '0005 - Catholic Student - Other'
WHEN 6 THEN '0006 - Other'
WHEN 10 THEN '0010 - Did not apply'
WHEN 20 THEN '0020 - CF - C - CS'
SELECT workdept,
LISTAGG(lastname, ', ') WITHIN GROUP(ORDER BY lastname) AS employees
FROM emp
GROUP BY workdept
/*
'A weekly summative report of attendance and lates for the school.'
CASE ABSENT_STATUS
WHEN 0 THEN 'Not absent/Unexplained'
WHEN 1 THEN 'Explained - Unverified'
WHEN 2 THEN 'Explained - Verified'
WHEN 3 THEN 'Explained - Verified (Sick)'
WHEN 4 THEN 'Explained - Verified (Suspended)'
WHEN 5 THEN 'Explained - Verified (Approved By Principal)'
date_range(date_on) AS
(
SELECT
DATE((CURRENT DATE) - 14 DAYS)
FROM sysibm.sysdummy1
UNION ALL
SELECT
date_on + 1 DAY
FROM date_range
WHERE date_on < DATE(CURRENT DATE)
WITH CASUAL_BLOB AS
(
SELECT
SE.EMPLOYMENT_TYPE_ID,
CONTACT.FIRSTNAME || ' ' || CONTACT.SURNAME AS "ORIGINAL_TEACHER",
TO_CHAR((CURRENT DATE), 'Month DD') AS "CASUAL_DATE",
REPLACEMENT,
PERIOD,
START_TIME,
END_TIME