Skip to content

Instantly share code, notes, and snippets.

View jonte's full-sized avatar
🍺
Cheers!

Jonatan Pålsson jonte

🍺
Cheers!
View GitHub Profile
@jonte
jonte / NoDupes.erl
Created January 4, 2011 14:24
Add an entry to a list without causing a dupe
New = 1,
CompleteList = [1,2,3,4,5], % 1 is already in list
NoDupes = [New | lists:delete(New, CompleteList)].
@jonte
jonte / gist:716727
Created November 26, 2010 13:46
Trigger of 'effin doom
DROP TRIGGER CourseOverFlowTrigger;
CREATE TRIGGER CourseOverflowTrigger
INSTEAD OF INSERT ON WaitingListView
REFERENCING NEW AS NewRow
OLD AS OldRow
FOR EACH ROW
DECLARE maxStudents NUMBER;
regedStudents NUMBER;
maxPlacement NUMBER;
numMissingCourses NUMBER;
@jonte
jonte / bom1.md
Last active August 29, 2015 14:27
ELFA Shopping list for the "Make: Electronics" book