Skip to content

Instantly share code, notes, and snippets.

@andreldm
andreldm / LatLong.java
Last active August 29, 2015 14:10
Mapsforge write standalone sample
public class LatLong {
private double latitude;
private double longitude;
public LatLong() {
super();
}
public LatLong(double latitude, double longitude) {
super();
@andreldm
andreldm / test.cpp
Created December 27, 2014 15:52
FLTK callback with classes
/*
Compiling
Windows:
g++ test.cpp -o test -std=gnu++11 -lfltk -lfltk_images -lole32 -luuid -lcomctl32 -lwsock32 -lgdi32 -lcomdlg32
*/
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
@andreldm
andreldm / update.sh
Created March 6, 2015 02:17
AUR Atom Package Updater
#!/bin/bash
if [ "$1" = "clean" ]; then
find . \
! -name update.sh \
! -name atom-python.patch \
! -name PKGBUILD \
-type f -delete
find . ! -name . -type d -exec rm -r {} +
exit 0
@andreldm
andreldm / doc2html.ps1
Created March 6, 2015 14:10
Script to convert doc[x] to html
# Run before: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word")
# Usage: .\doc2html.ps1 -docpath "C:\full\path\to\docs\folder" -htmlpath "C:\full\path\output\folder"
param([string]$docpath,[string]$htmlpath = $docpath);
$srcfiles = Get-ChildItem $docPath -include *.doc,*.docx -recurse
$saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFormatFilteredHTML");
$word = new-object -comobject word.application
$word.Visible = $False
@andreldm
andreldm / test.html
Last active September 24, 2015 14:07
Small test for encoding problems
<!DOCTYPE html>
<html>
<head>
<meta charset="iso-8859-15">
<title>Charset problems</title>
</head>
<body>
<p>Run: browser-sync start --server --files="*.html"</p>
<p>Ärzte Serviços Ursprünge questão gemäß à sensível responsável für é bilhões dólares modernização segurança.</p>
</body>
@andreldm
andreldm / tray-icon.vala
Created September 24, 2016 16:03
Status icon on tray written in vala (Gtk3)
using Gtk;
public class Main {
class AppStatusIcon : Window {
private StatusIcon trayicon;
private Gtk.Menu menuSystem;
private AboutDialog aboutDialog;
public AppStatusIcon() {
/* Create tray icon */
@andreldm
andreldm / PKGBUILD
Created May 9, 2017 02:48
PKGBUILD for Medis
# Maintainer: John Doe <john.doe at gmail dot com>
_pkgname=medis
_version=git
pkgname=${_pkgname}-${_version}
pkgver=0.6.1.c212
pkgrel=1
pkgdesc='Medis is a beautiful, easy-to-use database management application for Redis.'
arch=('x86_64' 'i686')
diff --git a/configure.ac.in b/configure.ac.in
index 738e6b0..44012cd 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -92,15 +92,15 @@ XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
-XDT_CHECK_PACKAGE([EXO], [exo-1], [0.10.0])
+XDT_CHECK_PACKAGE([EXO], [exo-2], [0.10.0])
@andreldm
andreldm / build.sh
Last active June 19, 2017 15:13
Build thunar-gtk3
#!/bin/bash
git clone https://github.com/andreldm/thunar.git thunar-gtk3
cd thunar-gtk3
./autogen.sh
make
pkill -i thunar
thunar/thunar
@andreldm
andreldm / fallback_for_xfce4panel.patch
Created June 23, 2017 03:34
Fallback for xfce4panel
diff --git a/configure.ac.in b/configure.ac.in
index 9012783..40b8806 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -45,7 +45,7 @@ AC_HEADER_STDC
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.13.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.12.0])