Skip to content

Instantly share code, notes, and snippets.

@hard-geha
hard-geha / save-running-virtualboxes
Created January 14, 2014 11:11
Simple init.d script to save all running virtualboxes on host shutdown or reboot
#!/bin/bash
### BEGIN INIT INFO
# Provides: save-running-virtualboxes
# Required-Start:
# Required-Stop: $network
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Stops all running virtualboxes
# Description: Stops all running virtualboxes of all users
### END INIT INFO
@Antaru
Antaru / holidays.php
Last active December 6, 2022 00:35
Class to determine Swedish holidays based on year
<?php
class Holidays {
private $dates;
private $enum_dates = array(
'NEW_YEARS_DAY' => array('Nyårsdagen'),
'EPIPHANY' => array('Trettondedag jul', 'Trettondagen'),
'HOLY_THURSDAY' => array('Skärtorsdagen'),
'GOOD_FRIDAY' => array('Långfredag'),