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.glade
Created Oct 19, 2019
Headerbar linked buttons
View sample.glade
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="window">
<property name="can_focus">False</property>
<property name="default_width">250</property>
<property name="default_height">150</property>
<child type="titlebar">
<object class="GtkHeaderBar">
@andreldm
andreldm / sample.html
Created Oct 8, 2019
Firefox Cantarell Issue
View sample.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
font-family: system-ui, 'Open Sans', Roboto, 'Helvetica Neue', sans-serif
}
</style>
</head>
@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')
View AprConfiguration.java
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.AprLifecycleListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* NOTE: You also need to install APR on your system, on Arch Linux the package is called `tomcat-native`.
@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 / PKGBUILD
Created Aug 16, 2018
AUR apfs-fuse-git
View PKGBUILD
# Maintainer: Adam Harvey <adam@adamharvey.name>
pkgname=apfs-fuse-git
pkgver=r54.cecf2aa
pkgrel=1
pkgdesc="FUSE driver for APFS (Apple File System)"
arch=('i686' 'x86_64')
url="https://github.com/sgan81/apfs-fuse"
license=('GPL')
groups=()
depends=('fuse2')
You can’t perform that action at this time.