Skip to content

Instantly share code, notes, and snippets.

@153957
153957 / toa_cal.js
Last active September 5, 2019 08:29
Fix TOA calender
// Added by Arne
jQuery( document ).ready(
function() {
setTimeout(
function() {
// Verberg minuten, alleen lesuren
jQuery("[name='time_minutes']").parent().parent().hide();
jQuery("[name='end_time_mm']").parent().parent().hide();
@153957
153957 / tidy_bib.sh
Created November 22, 2015 15:23
Clean up bib files
# Unfortunately '--output_align=false' seem not to be working.
biber --tool --output_fieldcase=lower --output_indent=4 *.bib
@153957
153957 / balls.html
Created October 18, 2015 19:37
Different types of colored status indicators in CSS
<html>
<head>
<style>
html {
font: 12px/1.2em sans-serif;
}
ul {
list-style: none;
}
@153957
153957 / README.md
Last active August 13, 2017 08:14
Aurora alert

Aurora alert

This script was written during a holiday in Rovaniemi. On one of the nights the immediate aurora forecast was not good, but fearing to miss anything while sleeping I quickly wrote this script. The script keeps an eye on the forecast Kp value (Aurora activity) and will play a sound if it looks good. Unfortunately the alarm did not go off, because there was no aurora activity. Luckily the following evening the alarm was not needed because we got an amazing show, see the

@153957
153957 / code.js
Last active August 29, 2015 14:16 — forked from davidfokkema/code.js
var station_info;
var coincidences;
var c_idx = 0;
var map = L.map('map');
var svg = d3.select(map.getPanes().overlayPane).append("svg"),
g = svg.append("g").attr("class", "leaflet-zoom-hide");
function x(coord) { return map.latLngToLayerPoint(coord).x };
function y(coord) { return map.latLngToLayerPoint(coord).y };
@153957
153957 / scp_with_spaces.md
Last active August 29, 2015 14:03
scp or rsync a remote file or path with spaces

Escape twice, once using quotes and once using backslashes

Use:

scp [user]@[server]:"[filepath]" [destination]

Example:

scp fred@server.me:"/Volumes/disk/file\ with\ space\ (and\ specials)" Here_please/

@153957
153957 / esd_update_status.md
Last active August 29, 2015 14:01
ESD Update status
@153957
153957 / coincidences_between_clusters.py
Created March 19, 2014 10:14
Check for coincidences between stations from different clusters.
import tables
data = tables.openFile('2013_8_1.h5', 'r')
c_index = data.root.coincidences.c_index
s_index = data.root.coincidences.s_index
clusters = [s_group.split('/')[2][8:] for s_group in s_index[:]]
stations = [s_group.split('/')[3][8:] for s_group in s_index[:]]
@153957
153957 / Mars.md
Last active October 30, 2016 18:53
Many Names of Mars
Name Language
Al-Qahira Arabic, Indonesian, Malay
Ares Greek
Auqakuh Quechua (Inca)
Bahram Persian
Harmakhis Ancient Egyptian
Her Desher Egyptian
Hrad Armenian
Huo Hsing Chinese
@153957
153957 / Run_base_simulation.py
Last active August 29, 2015 13:56
Run base SAPPHiRE simulation
import tables
from sapphire.simulations.base import BaseSimulation
from sapphire.clusters import ScienceParkCluster
datafile = tables.openFile('/tmp/test_base_simulation.h5', 'w')
cluster = ScienceParkCluster()
sim = BaseSimulation(cluster, datafile, '/simulations/this_run', 10)
sim.run()