Skip to content

Instantly share code, notes, and snippets.

@keigen-shu
keigen-shu / clanPatch_NCSSesque.diff
Last active August 29, 2015 14:20
ClanLib View style setter; made to remove need to recompile.
diff --git a/Examples/ThemeAero/Resources/scrollbar.css b/Examples/ThemeAero/Resources/scrollbar.css
new file mode 100644
index 0000000..0531c0e
--- /dev/null
+++ b/Examples/ThemeAero/Resources/scrollbar.css
@@ -0,0 +1,2 @@
+flex: 0 0 main-size;
+background: rgb(232, 232, 236);
diff --git a/Examples/ThemeAero/Resources/scrollbar_decrement.css b/Examples/ThemeAero/Resources/scrollbar_decrement.css
new file mode 100644
@keigen-shu
keigen-shu / clanManual_BuildLinux.md
Created April 8, 2015 18:15
ClanLib Linux build procedure

ClanLib Linux checkout procedure

This is the setup I have:

  • Arch Linux x86_64, updated about once every week.
  • Git repository has two remote repositories, origin keigen-shu/ClanLib and upstream sphair/ClanLib.
  • I have virtual autoconf build environment where ClanLib is built. The root directory (prefix) is /home/USER/code/root. autoconf installs stuff in /home/USER/code/root/include, /home/USER/code/root/lib and /home/USER/code/root/lib/pkg-config.

This is the procedure that I use when checking out a new commit from ClanLib.

@keigen-shu
keigen-shu / align.h
Last active August 29, 2015 14:04
Alignment submodule
/*
** ClanLib SDK
** Copyright (c) 1997-2014 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for any purpose,
** including commercial applications, and to alter it and redistribute it
@keigen-shu
keigen-shu / clanExt_JSONReader.cpp
Last active August 29, 2015 13:58
JSON tree reader for ClanLib objects.
// clanExt_JSONReader.cpp :: JSON reader
// authored by Chu Chin Kuan
//
// :: LICENSE AND COPYRIGHT ::
//
// The author disclaims copyright to this source code.
//
// The author or authors of this code dedicate any and all copyright interest
// in this code to the public domain. We make this dedication for the benefit
// of the public at large and to the detriment of our heirs and successors.
@keigen-shu
keigen-shu / clanExt_Rectx.cpp
Created November 7, 2013 05:55
Rectangle alignment
////////////////////////////////////////////////////////////
// rectangle alignment :: alignXY
// where X = Left, Center, Right; Y = Top, Center, Bottom
//////// clan::Rectx -> clan::Sizex -> clan::Rectx
template <typename T>
inline clan::Rectx<T> alignLT (const clan::Rectx<T> &area, const clan::Sizex<T> &size)
{
T l = area.left;
T r = area.left + size.width;
T u = area.top;
@keigen-shu
keigen-shu / packOMC.py
Created December 5, 2012 17:00
OJM::OMC packaging script with obfuscator
#!/usr/bin/env python3
import os, random, sys, struct
"""
OMC/OJM obfuscating/packaging script by Keigen Shu
version 1 :: Dec 6th, 2010
"""
######## Options to mess up data :D