Skip to content

Instantly share code, notes, and snippets.

View freestream's full-sized avatar

Anton Samuelsson freestream

View GitHub Profile
@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'),
@stephanetimmermans
stephanetimmermans / ubuntu-compass-ruby
Last active May 16, 2024 03:29
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@gwillem
gwillem / magento-nginx.conf
Last active July 29, 2023 10:13
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {