Skip to content

Instantly share code, notes, and snippets.

Som tidligere informatikkstudent, nå ansatt i en bedrift i Oslo-området, drar jeg kjennskap på en del av det du sier om kulturelle forskjeller mellom Dragvoll og andre campus. Helt fra tiden da jeg begynte på NTNU i 2007 fikk jeg tredd nedover hodet at man skulle tenke på studenter fra Dragvoll som rivaler. Allikevel kan jeg ikke si at jeg kjenner meg igjen i det hatet du beskriver, eller hva kulturen på Gløshaugen bidrar til.
Linjeforeningen Online er ung. Ikke bare sett i forhold til mastodontene på Gløshaugen, som i disse dager holder på å runde 100 år, men også fordi så å si alt falt i grus i løpet av dotkombobla og man startet på bar bakke, nesten uten studenter på studiet. 2002, da Informatikk flyttet fra den Allmennvitenskapelige Høgskolen's lokalt på Lage til NTNU Gløshaugen, besto hele linjeforeningen Online av en håndfull studenter som organiserte så å si alt alene. Gå tilbake til ca 1995, så var alt igjen startet på nytt fordi vi manglet interesse og kontinuitet. Etter det jeg erfarer sliter mange
@melwil
melwil / trim.sql
Created October 16, 2017 12:32
TSQL trim function
CREATE FUNCTION [dbo].[udfTrim]
(
@StringToClean as varchar(8000)
)
RETURNS varchar(8000)
AS
BEGIN
--Replace all non printing whitespace characers with Characer 32 whitespace
--NULL
@melwil
melwil / Console.java
Created January 25, 2014 19:16
UTF-8 printing in windows console
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.win32.StdCallLibrary;
/**
* This class handles output for the ConsoleUI.
* Special handling for this is needed as UTF-8 output in Windows is unreliable
* due to a broken unicode page.
*
@melwil
melwil / christmas-tree.py
Last active December 29, 2015 16:48
Generates christmas trees.
# -*- coding:UTF-8 -*-
#######################################################
# #
# This program creates chrismas trees. The initial #
# purpose of it was to have a template to make pixel #
# art trees for the windows of the office at NTNU. #
# #
# Author: Håvard Slettvold aka. melwil #
# #
# Dependencies: PyPNG #
@melwil
melwil / TestBASE64.java
Created May 3, 2013 08:46
Small test suite for BASE64 regex.
public class TestBASE64 {
public static void main(String[]a) {
String regex = "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$";
String[] test = {
"TWFu",
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=",
"YW55IGNhcm5hbCBwbGVhc3VyZS4=",
"YW55IGNhcm5hbCBwbGVhc3VyZQ==",
"YW55IGNhcm5hbCBwbGVhc3Vy",
@melwil
melwil / gist:4750311
Created February 10, 2013 17:27
Star Wars Episode V: A New Hope
17 Episode.IV (206.214.251.1) 208.584 ms 212.080 ms 211.850 ms
18 A.NEW.HOPE (206.214.251.6) 205.525 ms 208.306 ms 209.565 ms
19 It.is.a.period.of.civil.war (206.214.251.9) 211.444 ms 211.287 ms 214.330 ms
20 Rebel.spaceships (206.214.251.14) 207.952 ms 209.508 ms 210.667 ms
21 striking.from.a.hidden.base (206.214.251.17) 205.953 ms 211.800 ms 207.414 ms
22 have.won.their.first.victory (206.214.251.22) 209.155 ms 211.656 ms 209.797 ms
23 against.the.evil.Galactic.Empire (206.214.251.25) 215.165 ms 216.145 ms 216.667 ms
24 During.the.battle (206.214.251.30) 211.148 ms * *
25 Rebel.spies.managed (206.214.251.33) 214.694 ms * *
26 to.steal.secret.plans (206.214.251.38) 209.016 ms 205.519 ms 205.806 ms
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artist>
<name>Moo the man</name>
</artist>
with namespace="http://www.spotify.com/ns/music/1"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:artist xmlns:ns2="http://www.spotify.com/ns/music/1">
@melwil
melwil / Artist.java
Created March 1, 2012 01:35
artist umarshalling spotify
XML from spotify API
------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<artist xmlns="http://www.spotify.com/ns/music/1">
<name>David Guetta</name>
</artist>
------------------
Artist.java;
@melwil
melwil / groups.yml
Created February 23, 2012 02:25
Groups for survival (pub)
default: default
groups:
admin:
permissions:
- bPermissions.admin
groups:
- mod
meta:
priority: '100'
mod:
@melwil
melwil / users.yml
Created February 23, 2012 02:25
Users for survival (pub)
users:
melwil:
permissions: []
groups:
- reg