This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash version of https://askubuntu.com/a/464683 | |
declare -a screens | |
screens+=($(xrandr | awk '/ connect/{print $1}' | xargs)) | |
message="${1:-"Alarm triggered!"}" | |
echo "Alarm message: ${message}" | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET creds=ServiceSolrUpdate:8zpQUxQ5 | |
SET ct="Content-Type: text/xml" | |
SET q="<delete><query>*:*</query></delete>" | |
SET u=http://search-server.uis.no/solr | |
for %%c in ( student-en student-nb student-nn studinfo-en studinfo-nb studinfo-nn ) do curl --basic -u %creds% -H %ct% --data-binary %q% %u%/%%c/update?commit=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.uis.service.fsimport.impl; | |
import java.io.IOException; | |
import org.apache.xerces.impl.Constants; | |
import org.apache.xerces.impl.XMLEntityManager; | |
import org.apache.xerces.impl.XMLEntityScanner; | |
public class EntityManager extends XMLEntityManager { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<root> | |
<url>See http://www.uis.no</url> | |
</root> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:fs="http://fsws.usit.no/schemas/studinfo" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:functx="http://www.functx.com" | |
exclude-result-prefixes="xs fs functx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.uis.service.fsimport; | |
import static org.junit.Assert.*; | |
import java.io.File; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is the Realm definition for Active Directory Don't forget to put the server's certificate in Tomcat's keystore --> | |
<Engine name="Catalina" defaultHost="localhost"> | |
<Realm className="org.apache.catalina.realm.LockOutRealm"--> | |
<Realm className="org.apache.catalina.realm.JNDIRealm" | |
connectionURL="ldaps://ad01.uis.no" | |
connectionName="THE_FULL_USER_DN_OF_THE_AD_USER" | |
connectionPassword="THE_PASSWORD" | |
userBase="DC=uis,DC=no" | |
adCompat="true" | |
userSubtree="true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="httpClient" class="no.uis.service.fsimport.util.PreemptBasicAuthHttpClient"> | |
<constructor-arg index="0" value="${solr.server.url}"/> | |
<constructor-arg index="1" value="${solr.server.username}"/> | |
<constructor-arg index="2" value="${solr.server.password}"/> | |
</bean> | |
<bean id="solrServer" class="org.apache.solr.client.solrj.impl.HttpSolrServer"> | |
<constructor-arg index="0" value="${solr.server.url}"/> | |
<constructor-arg index="1" ref="httpClient"/> | |
<constructor-arg index="2"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.uis.service.fsimport.util; | |
import java.net.URL; | |
import org.apache.http.HttpHost; | |
import org.apache.http.auth.AuthScope; | |
import org.apache.http.auth.UsernamePasswordCredentials; | |
import org.apache.http.client.AuthCache; | |
import org.apache.http.client.protocol.ClientContext; | |
import org.apache.http.impl.auth.BasicScheme; |