Skip to content

Instantly share code, notes, and snippets.

View shana's full-sized avatar
🥽
glub glub

Andreia Gaita shana

🥽
glub glub
View GitHub Profile
if (reader.HasAttributes) {
+ string ig = reader.GetAttribute ("Ignorable", IgnorableUri);
+ if (ig != null) {
+ foreach (string s in ig.Split (' '))
+ node.IgnorablePrefixes.Add (s);
+ }
@shana
shana / fsc simple makefile
Created March 21, 2011 22:21
an f# makefile
sources = \
file1.fs \
file2.fs
references = \
lib1.dll \
lib2.dll
program.exe:
fsc --target:exe -o:$@ $(references) $(sources)
<glib:signal name="hovering-over-link">
<return-value transfer-ownership="full">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="utf8" c:type="gchararray"/>
</parameter>
<parameter name="p0" transfer-ownership="none">
<type name="utf8" c:type="gchararray"/>
g_signal_new("should-insert-node", G_TYPE_FROM_CLASS(webViewClass),
static_cast<GSignalFlags>(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
G_STRUCT_OFFSET(WebKitWebViewClass, should_allow_editing_action), g_signal_accumulator_first_wins, 0,
webkit_marshal_BOOLEAN__OBJECT_OBJECT_ENUM, G_TYPE_BOOLEAN,
3, WEBKIT_TYPE_DOM_NODE, WEBKIT_TYPE_DOM_RANGE, WEBKIT_TYPE_INSERT_ACTION);
This:
<signal name="ShouldInsertNode" cname="should-insert-node">
<return-type type="gboolean" />
<parameters>
@shana
shana / git aliases
Created April 9, 2011 19:17
add this to ~/.gitconfig
[alias]
co = checkout
st = status
praise = blame
la = diff --cached --name-only
ls = ls-files -m
da = diff --cached
shown = show --name-status
yank = cherry-pick
lg = log --name-status
commit 450e35516e454cd511bbaea1429204f804dba6a2
Author: Andreia Gaita <[email protected]>
Date: Fri Dec 30 17:58:43 2011 +0000
Add a bit more smarts to the library name resolver
On certain OSs (looking at you OSX) the usual "lib" prefix is
not quite standard, some libraries don't use a prefix at all. Since
the resolver only tries an empty prefix once with the absolute name
set on the DllImport directive, the lookup will fail (especially
@shana
shana / gist:2369224
Created April 12, 2012 17:11
Sample CreateFrameBuffer override to detect and fallback in case of errors
// This method is called everytime the context needs
// to be recreated. Use it to set any egl-specific settings
// prior to context creation
protected override void CreateFrameBuffer ()
{
GLContextVersion = GLContextVersion.Gles1_1;
// the default GraphicsMode that is set consists of (16, 16, 0, 0, 2, false)
try {
Log.Verbose ("TexturedCube", "Loading with default settings");
@shana
shana / gist:3012473
Created June 28, 2012 16:54
Example from WebKit-1.0.gir
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:whitespace="preserve">A #gchar</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</method>
<property name="name" transfer-ownership="none">
<type name="utf8"/>
</property>
CoglPango-1.0.gir: shared-library="libcogl.so.9,libcogl-pango.so.0"
EBook-1.2.gir: shared-library="libebook-1.2.so.13,libedataserver-1.2.so.16"
Evd-0.1.gir: shared-library="libevd-0.1.so.0,libuuid.so.1,libgcrypt.so.11"
Gcr-3.gir: shared-library="libgcr-base-3.so.1,libgcr-3.so.1"
GLib-2.0.gir: shared-library="libglib-2.0.so.0,libgobject-2.0.so.0"
GstBase-0.10.gir: shared-library="libgstreamer-0.10.so.0,libgstbase-0.10.so.0"
GstCheck-0.10.gir: shared-library="libgstreamer-0.10.so.0,libgstcheck-0.10.so.0"
GstController-0.10.gir: shared-library="libgstreamer-0.10.so.0,libgstcontroller-0.10.so.0"
GstNet-0.10.gir: shared-library="libgstreamer-0.10.so.0,libgstnet-0.10.so.0"
GstPbutils-0.10.gir: shared-library="libgstpbutils-0.10.so.0,libgstreamer-0.10.so.0"
diff --git a/configure.ac b/configure.ac
index 3f3e47f..39b6077 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,7 @@ AC_ARG_ENABLE(appindicator,
if test "x$appindicator" != "xno" ; then
PKG_CHECK_MODULES([APPINDICATOR_SHARP], [appindicator-sharp-0.1], appindicator="yes", appindicator="no")
if test "$appindicator" == "no" ; then
- AC_MSG_ERROR([Please install appindicator-sharp, if you want systray support on Ubuntu/Unity. \
+ AC_MSG_WARN([Please install appindicator-sharp, if you want systray support on Ubuntu/Unity. \