Skip to content

Instantly share code, notes, and snippets.

💭
.

Arne de Laat 153957

💭
.
Block or report user

Report or block 153957

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@153957
153957 / toa_cal.js
Last active Sep 5, 2019
Fix TOA calender
View toa_cal.js
// 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 Nov 22, 2015
Clean up bib files
View tidy_bib.sh
# Unfortunately '--output_align=false' seem not to be working.
biber --tool --output_fieldcase=lower --output_indent=4 *.bib
@153957
153957 / balls.html
Created Oct 18, 2015
Different types of colored status indicators in CSS
View balls.html
<html>
<head>
<style>
html {
font: 12px/1.2em sans-serif;
}
ul {
list-style: none;
}
@153957
153957 / README.md
Last active Aug 13, 2017
Aurora alert
View README.md

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

View 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 Aug 29, 2015
scp or rsync a remote file or path with spaces
View scp_with_spaces.md

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 / coincidences_between_clusters.py
Created Mar 19, 2014
Check for coincidences between stations from different clusters.
View coincidences_between_clusters.py
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 Oct 30, 2016
Many Names of Mars
View Mars.md
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 Aug 29, 2015
Run base SAPPHiRE simulation
View Run_base_simulation.py
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()
You can’t perform that action at this time.