Skip to content

Instantly share code, notes, and snippets.

@sebzur
sebzur / polish_holidays.py
Created February 12, 2012 20:25
Python generator for public holidays in Poland
from datetime import date, timedelta
from dateutil import easter
from dateutil.relativedelta import *
def get_holidays(year=2010):
""" Returns Polish hollidays dates (legally considered non-working days) """
easter_sunday = easter.easter(year)
holidays = {'New Year': date(year,1,1),
'Trzech Kroli': date(year,1,6),
'Easter Sunday': easter_sunday,
@ArnisL
ArnisL / tmux_24_bit_colours.c
Last active November 2, 2019 18:59
tmux 24 bit colour support
From 9bc0f9402df5155065e4c31eed0e986b700df717 Mon Sep 17 00:00:00 2001
From: Arnis Lapsa <arnis.lapsa@gmail.com>
Date: Fri, 2 Aug 2013 16:15:46 +0300
Subject: [PATCH] 24bit colour support
---
colour.c | 6 ---
input.c | 30 +++++++++++++-
screen-write.c | 85 +++++++++++++++++++++++++++++++++++++-
tmux.h | 11 +++++
@choppsv1
choppsv1 / tmux-24.diff
Last active December 21, 2018 15:25
True color (24-bit) terminal support for tmux-1.9a and tmux-2.0
This diff is a modified version of a diff written by Arnis Lapsa.
[ The original can be found here: https://gist.github.com/ArnisL/6156593 ]
This diff adds support to tmux for 24-bit color CSI SRG sequences. This
allows terminal based programs that take advantage of it (e.g., vim or
emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch)
to display 16 million colors while running in tmux.
The primary change I made was to support ":" as a delimeter as well
@axemclion
axemclion / JSIObject.cpp
Last active October 4, 2023 19:36
React Native JSI Example
// This sample is a Work in Progress for JSI , and specific functions may change.
#pragma once
#include <string>
#include <unordered_map>
#include <jsi/jsi.h>
// This SameplJSIObject needs to inheric from HostObject, and this is the object that will be exposed to JS.