Skip to content

Instantly share code, notes, and snippets.

Andre Miranda andreldm

Block or report user

Report or block andreldm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andreldm
andreldm / sample.c
Created Sep 7, 2019
Non-transient dialog with minimize button (which doesn't work)
View sample.c
/*
* Build:
* gcc $(pkg-config --cflags gtk+-3.0) sample.c -o sample $(pkg-config --libs gtk+-3.0)
*/
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
GtkWidget *window, *dialog;
@andreldm
andreldm / menu-items-icons-sample.c
Last active Aug 14, 2019
How to avoid GtkImageMenuItem and keep icons on menu items
View menu-items-icons-sample.c
/*
* Build:
* gcc $(pkg-config --cflags gtk+-3.0) sample.c -o sample $(pkg-config --libs gtk+-3.0)
*/
#include <gtk/gtk.h>
static GtkWidget*
create_menu_item (const gchar *str, const char *icon_name)
{
View i18n_updates.sh
#!/bin/bash
STARTTAG="$1"
ENDTAG="${2:-HEAD}"
git log --pretty=format:%s $1..$2 | \
grep "^I18n" | sed -E "s/.*translation (\w+) \(.*/\1/g" | sort | \
uniq | python -c "from icu import Locale
from fileinput import input
en = Locale('en')
@andreldm
andreldm / icon_tester.c
Last active May 26, 2019
Icon lookup tester
View icon_tester.c
/*
* Build:
* gcc $(pkg-config --cflags gtk+-3.0) icon_tester.c -o icon_tester $(pkg-config --libs gtk+-3.0)
*/
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
gtk_init (&argc, &argv);
@andreldm
andreldm / xfce412vs413.md
Created May 15, 2019
Xfce 4.12 vs 4.13 Memory Comparison
View xfce412vs413.md

Xfce 4.12 vs 4.13 Memory Comparison

Setup

  • Raspberry Pi 2 (quad-code ARMv7 @900Mhz, 1GB Ram)
  • 16GB class 10 SD Card
  • 1920x1080 display
  • Arch Linux ARM updated @ 2019-05-01
  • Kernel 4.19.37
  • Theme/Icons: Adwaita
@andreldm
andreldm / fs_sample.c
Last active May 14, 2019
GIO file read/write info
View fs_sample.c
/*
* Build:
* gcc $(pkg-config --cflags gtk+-3.0) fs_sample.c -o fs_sample $(pkg-config --libs gtk+-3.0)
*/
#include <gtk/gtk.h>
void check(const char *path)
{
GFile *file = g_file_new_for_path (path);
@andreldm
andreldm / sample.c
Created Feb 27, 2019
GTK CSS issue reproducer
View sample.c
/*
* gcc $(pkg-config --cflags gtk+-3.0) sample.c -o sample $(pkg-config --libs gtk+-3.0)
*/
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *box;
View xfmpc-gtk3.patch
diff --git a/configure.in.in b/configure.in.in
index eb69a65..c4c0347 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -57,10 +57,10 @@ dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_LIBX11_REQUIRE()
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.16.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
@andreldm
andreldm / bucketsort_sample.json
Created Sep 17, 2018
WeDeploy BucketSort Sample
View bucketsort_sample.json
[
{
"date": "2018-04-01",
"price": 11.9
},
{
"date": "2018-04-01",
"price": 84.21
},
{
View hash benchmark output
030822cb-da90-41ac-92ae-e08013a6c04c1535074412389
a533b497764368b4b2e47224e70a2281
MD5: 2192
6263b5919b0912b1d46c4185abba5cac4add04f1
SHA-1: 1708
5bf2e980fd1b8968cd5a4319617c9754af7af70d200bbb3b82dd8eaca8977f41
SHA-256: 1776
b56a4a12187814f8429ebe43bc893ddb6ebb23c0687de3c162889fd1c75bd7e35dba3edef72e4de6503bbeb38846d73fdab3e3339f15343fe6fb329adec240b1
SHA-512: 1793
-------
You can’t perform that action at this time.